Loading django/utils/translation/trans_real.py +3 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,9 @@ class DjangoTranslation(gettext_module.GNUTranslations): # default lang should have at least one translation file available. raise IOError("No translation files found for default language %s." % settings.LANGUAGE_CODE) self._add_fallback() if self._catalog is None: # No catalogs found for this language, set an empty catalog. self._catalog = {} def __repr__(self): return "<DjangoTranslation lang:%s>" % self.__language Loading docs/releases/1.8.9.txt +3 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,6 @@ Bugfixes * Fixed a regression that caused the "user-tools" items to display on the admin's logout page (:ticket:`26035`). * Fixed a crash in the translations system when the current language has no translations (:ticket:`26046`). docs/releases/1.9.2.txt +5 −2 Original line number Diff line number Diff line Loading @@ -9,8 +9,11 @@ Django 1.9.2 fixes several bugs in 1.9.1. Bugfixes ======== * Fixed a regression in ``ConditionalGetMiddleware`` causing ``If-None-Match`` checks to always return HTTP 200 (:ticket:`26024`). * Fixed a regression in ``ConditionalGetMiddleware`` causing ``If-None-Match`` checks to always return HTTP 200 (:ticket:`26024`). * Fixed a regression that caused the "user-tools" items to display on the admin's logout page (:ticket:`26035`). * Fixed a crash in the translations system when the current language has no translations (:ticket:`26046`). tests/i18n/tests.py +4 −0 Original line number Diff line number Diff line Loading @@ -1581,6 +1581,10 @@ class TestLanguageInfo(SimpleTestCase): def test_unknown_language_code(self): six.assertRaisesRegex(self, KeyError, r"Unknown language code xx\.", get_language_info, 'xx') with translation.override('xx'): # A language with no translation catalogs should fallback to the # untranslated string. self.assertEqual(ugettext("Title"), "Title") def test_unknown_only_country_code(self): li = get_language_info('de-xx') Loading Loading
django/utils/translation/trans_real.py +3 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,9 @@ class DjangoTranslation(gettext_module.GNUTranslations): # default lang should have at least one translation file available. raise IOError("No translation files found for default language %s." % settings.LANGUAGE_CODE) self._add_fallback() if self._catalog is None: # No catalogs found for this language, set an empty catalog. self._catalog = {} def __repr__(self): return "<DjangoTranslation lang:%s>" % self.__language Loading
docs/releases/1.8.9.txt +3 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,6 @@ Bugfixes * Fixed a regression that caused the "user-tools" items to display on the admin's logout page (:ticket:`26035`). * Fixed a crash in the translations system when the current language has no translations (:ticket:`26046`).
docs/releases/1.9.2.txt +5 −2 Original line number Diff line number Diff line Loading @@ -9,8 +9,11 @@ Django 1.9.2 fixes several bugs in 1.9.1. Bugfixes ======== * Fixed a regression in ``ConditionalGetMiddleware`` causing ``If-None-Match`` checks to always return HTTP 200 (:ticket:`26024`). * Fixed a regression in ``ConditionalGetMiddleware`` causing ``If-None-Match`` checks to always return HTTP 200 (:ticket:`26024`). * Fixed a regression that caused the "user-tools" items to display on the admin's logout page (:ticket:`26035`). * Fixed a crash in the translations system when the current language has no translations (:ticket:`26046`).
tests/i18n/tests.py +4 −0 Original line number Diff line number Diff line Loading @@ -1581,6 +1581,10 @@ class TestLanguageInfo(SimpleTestCase): def test_unknown_language_code(self): six.assertRaisesRegex(self, KeyError, r"Unknown language code xx\.", get_language_info, 'xx') with translation.override('xx'): # A language with no translation catalogs should fallback to the # untranslated string. self.assertEqual(ugettext("Title"), "Title") def test_unknown_only_country_code(self): li = get_language_info('de-xx') Loading