i18n middlaware typo fix

This commit is contained in:
Oleg A 2020-09-10 13:11:21 +03:00 committed by GitHub
parent 29dc9540d2
commit 001b20dcb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,13 +59,13 @@ class I18nMiddleware(BaseMiddleware):
with open(mo_path, 'rb') as fp:
translations[name] = gettext.GNUTranslations(fp)
elif os.path.exists(mo_path[:-2] + 'po'):
raise RuntimeError(f"Found locale '{name} but this language is not compiled!")
raise RuntimeError(f"Found locale '{name}' but this language is not compiled!")
return translations
def reload(self):
"""
Hot reload locles
Hot reload locales
"""
self.locales = self.find_locales()