summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/utils/translation/trans_real.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index 84a42490eb..9d246324f0 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -173,8 +173,9 @@ class DjangoTranslation(gettext_module.GNUTranslations):
"gettext calls at import time.")
for app_config in app_configs:
localedir = os.path.join(app_config.path, 'locale')
- translation = self._new_gnu_trans(localedir)
- self.merge(translation)
+ if os.path.exists(localedir):
+ translation = self._new_gnu_trans(localedir)
+ self.merge(translation)
def _add_local_translations(self):
"""Merges translations defined in LOCALE_PATHS."""