mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[Core] Support already loaded packages in [p]load (#2116)
This commit is contained in:
committed by
Toby Harradine
parent
ee7e8aa782
commit
76bbcf2f8c
@@ -3,8 +3,6 @@ import re
|
||||
from pathlib import Path
|
||||
from typing import Callable, Union
|
||||
|
||||
from . import commands
|
||||
|
||||
__all__ = ["get_locale", "set_locale", "reload_locales", "cog_i18n", "Translator"]
|
||||
|
||||
_current_locale = "en_us"
|
||||
@@ -219,6 +217,12 @@ class Translator(Callable[[str], str]):
|
||||
self.translations.update({untranslated: translated})
|
||||
|
||||
|
||||
# This import to be down here to avoid circular import issues.
|
||||
# This will be cleaned up at a later date
|
||||
# noinspection PyPep8
|
||||
from . import commands
|
||||
|
||||
|
||||
def cog_i18n(translator: Translator):
|
||||
"""Get a class decorator to link the translator to this cog."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user