summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-02-16 12:17:17 +0000
committerJannis Leidel <jannis@leidel.info>2010-02-16 12:17:17 +0000
commit12d40a9fd63d1b92d7410f8fec8adc69980daee0 (patch)
treecc262f2f6cd8b1c973dda41cec2ae69f18076235 /django/utils
parent16942e178f713537ba3d341192019cfd2874d89e (diff)
Fixed #11384 - Make sure translations in the project directory really override translations in apps as specified in the docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/translation/trans_real.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index e6e0a61201..7a66177f30 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -155,9 +155,6 @@ def translation(language):
if os.path.isdir(localepath):
res = _merge(localepath)
- if projectpath and os.path.isdir(projectpath):
- res = _merge(projectpath)
-
for appname in settings.INSTALLED_APPS:
app = import_module(appname)
apppath = os.path.join(os.path.dirname(app.__file__), 'locale')
@@ -165,6 +162,9 @@ def translation(language):
if os.path.isdir(apppath):
res = _merge(apppath)
+ if projectpath and os.path.isdir(projectpath):
+ res = _merge(projectpath)
+
if res is None:
if fallback is not None:
res = fallback