From d66bb9c93e0efe2142172ff5171c2b4766e329dc Mon Sep 17 00:00:00 2001 From: profitroll Date: Sun, 6 Aug 2023 01:44:51 +0200 Subject: [PATCH] Locale of _() now defaults to "en" --- libbot/i18n/__init__.py | 4 ++-- libbot/i18n/sync/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libbot/i18n/__init__.py b/libbot/i18n/__init__.py index 00c7121..ed7bc7a 100644 --- a/libbot/i18n/__init__.py +++ b/libbot/i18n/__init__.py @@ -9,7 +9,7 @@ from libbot.i18n.classes.bot_locale import BotLocale async def _( key: str, *args: str, - locale: str = sync.config_get("locale"), + locale: str = "en", locales_root: Union[str, Path] = Path("locale"), ) -> Any: """Get value of locale string @@ -17,7 +17,7 @@ async def _( ### Args: * key (`str`): The last key of the locale's keys path. * *args (`list`): Path to key like: `dict[args][key]`. - * locale (`str`): Locale to looked up in. Defaults to config's `"locale"` value. + * locale (`str`): Locale to looked up in. Defaults to `"en"`. * locales_root (`Union[str, Path]`, *optional*): Folder where locales are located. Defaults to `Path("locale")`. ### Returns: diff --git a/libbot/i18n/sync/__init__.py b/libbot/i18n/sync/__init__.py index dbdbf59..5aeee02 100644 --- a/libbot/i18n/sync/__init__.py +++ b/libbot/i18n/sync/__init__.py @@ -9,7 +9,7 @@ from libbot.sync import config_get, json_read def _( key: str, *args: str, - locale: str = sync.config_get("locale"), + locale: str = "en", locales_root: Union[str, Path] = Path("locale"), ) -> Any: """Get value of locale string @@ -17,7 +17,7 @@ def _( ### Args: * key (`str`): The last key of the locale's keys path. * *args (`list`): Path to key like: `dict[args][key]`. - * locale (`str`): Locale to looked up in. Defaults to config's `"locale"` value. + * locale (`str`): Locale to looked up in. Defaults to `"en"`. * locales_root (`Union[str, Path]`, *optional*): Folder where locales are located. Defaults to `Path("locale")`. ### Returns: