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.")
|
"gettext calls at import time.")
|
||||||
for app_config in app_configs:
|
for app_config in app_configs:
|
||||||
localedir = os.path.join(app_config.path, 'locale')
|
localedir = os.path.join(app_config.path, 'locale')
|
||||||
translation = self._new_gnu_trans(localedir)
|
if os.path.exists(localedir):
|
||||||
self.merge(translation)
|
translation = self._new_gnu_trans(localedir)
|
||||||
|
self.merge(translation)
|
||||||
|
|
||||||
def _add_local_translations(self):
|
def _add_local_translations(self):
|
||||||
"""Merges translations defined in LOCALE_PATHS."""
|
"""Merges translations defined in LOCALE_PATHS."""
|
||||||
|
|
Loading…
Reference in New Issue