0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed #27454 -- Skipped gettext calls for apps without a locale dir.

This commit is contained in:
Carl Meyer 2016-11-07 09:59:13 +01:00 committed by Tim Graham
parent cb3fb34b86
commit 7107b6ff0f

View File

@ -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."""