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:
parent
cb3fb34b86
commit
7107b6ff0f
@ -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."""
|
||||
|
Loading…
Reference in New Issue
Block a user