Kaydet (Commit) 7107b6ff authored tarafından Carl Meyer's avatar Carl Meyer Kaydeden (comit) Tim Graham

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

üst cb3fb34b
......@@ -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."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment