mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
i18n middlaware typo fix
This commit is contained in:
parent
29dc9540d2
commit
001b20dcb6
1 changed files with 2 additions and 2 deletions
|
|
@ -59,13 +59,13 @@ class I18nMiddleware(BaseMiddleware):
|
||||||
with open(mo_path, 'rb') as fp:
|
with open(mo_path, 'rb') as fp:
|
||||||
translations[name] = gettext.GNUTranslations(fp)
|
translations[name] = gettext.GNUTranslations(fp)
|
||||||
elif os.path.exists(mo_path[:-2] + 'po'):
|
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
|
return translations
|
||||||
|
|
||||||
def reload(self):
|
def reload(self):
|
||||||
"""
|
"""
|
||||||
Hot reload locles
|
Hot reload locales
|
||||||
"""
|
"""
|
||||||
self.locales = self.find_locales()
|
self.locales = self.find_locales()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue