1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #18040 -- Removed so-called project-level locale trees from the list of paths the translation loading process takes in account.

Deprecated in Django 1.3. Removed completely for Django 1.5.

Thanks Claude for the review.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ramiro Morales
2012-03-31 22:24:24 +00:00
parent f38cf60c35
commit b41ebcf1b9
8 changed files with 3 additions and 112 deletions

View File

@@ -40,7 +40,6 @@ from .patterns.tests import (URLRedirectWithoutTrailingSlashTests,
URLTranslationTests, URLDisabledTests, URLTagTests, URLTestCaseBase,
URLRedirectWithoutTrailingSlashSettingTests, URLNamespaceTests,
URLPrefixTests, URLResponseTests, URLRedirectTests, PathUnusedTests)
from .test_warnings import DeprecationWarningTests
here = os.path.dirname(os.path.abspath(__file__))
@@ -869,29 +868,6 @@ class LocalePathsResolutionOrderI18NTests(ResolutionOrderI18NTests):
with self.settings(INSTALLED_APPS=extended_apps):
self.assertUgettext('Time', 'LOCALE_PATHS')
def test_locale_paths_override_project_translation(self):
with self.settings(SETTINGS_MODULE='regressiontests'):
self.assertUgettext('Date/time', 'LOCALE_PATHS')
class ProjectResolutionOrderI18NTests(ResolutionOrderI18NTests):
def setUp(self):
self.old_settings_module = settings.SETTINGS_MODULE
settings.SETTINGS_MODULE = 'regressiontests'
super(ProjectResolutionOrderI18NTests, self).setUp()
def tearDown(self):
settings.SETTINGS_MODULE = self.old_settings_module
super(ProjectResolutionOrderI18NTests, self).tearDown()
def test_project_translation(self):
self.assertUgettext('Date/time', 'PROJECT')
def test_project_override_app_translation(self):
extended_apps = list(settings.INSTALLED_APPS) + ['regressiontests.i18n.resolution']
with self.settings(INSTALLED_APPS=extended_apps):
self.assertUgettext('Date/time', 'PROJECT')
class DjangoFallbackResolutionOrderI18NTests(ResolutionOrderI18NTests):
def test_django_fallback(self):