BotLocale now has default_locale
This commit is contained in:
parent
bc5be37ff1
commit
00b1058014
@ -10,6 +10,7 @@ class BotLocale:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
default_locale: Union[str, None] = "en",
|
||||
locales_root: Union[str, Path] = Path("locale"),
|
||||
) -> None:
|
||||
if isinstance(locales_root, str):
|
||||
@ -23,7 +24,9 @@ class BotLocale:
|
||||
".".join(entry.split(".")[:-1]) for entry in files_locales
|
||||
]
|
||||
|
||||
self.default: str = sync.config_get("locale")
|
||||
self.default: str = (
|
||||
sync.config_get("locale") if default_locale is None else default_locale
|
||||
)
|
||||
self.locales: dict = {}
|
||||
|
||||
for lc in valid_locales:
|
||||
|
Loading…
Reference in New Issue
Block a user