Locale of _() now defaults to "en"
This commit is contained in:
parent
253c85985b
commit
d66bb9c93e
@ -9,7 +9,7 @@ from libbot.i18n.classes.bot_locale import BotLocale
|
|||||||
async def _(
|
async def _(
|
||||||
key: str,
|
key: str,
|
||||||
*args: str,
|
*args: str,
|
||||||
locale: str = sync.config_get("locale"),
|
locale: str = "en",
|
||||||
locales_root: Union[str, Path] = Path("locale"),
|
locales_root: Union[str, Path] = Path("locale"),
|
||||||
) -> Any:
|
) -> Any:
|
||||||
"""Get value of locale string
|
"""Get value of locale string
|
||||||
@ -17,7 +17,7 @@ async def _(
|
|||||||
### Args:
|
### Args:
|
||||||
* key (`str`): The last key of the locale's keys path.
|
* key (`str`): The last key of the locale's keys path.
|
||||||
* *args (`list`): Path to key like: `dict[args][key]`.
|
* *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")`.
|
* locales_root (`Union[str, Path]`, *optional*): Folder where locales are located. Defaults to `Path("locale")`.
|
||||||
|
|
||||||
### Returns:
|
### Returns:
|
||||||
|
@ -9,7 +9,7 @@ from libbot.sync import config_get, json_read
|
|||||||
def _(
|
def _(
|
||||||
key: str,
|
key: str,
|
||||||
*args: str,
|
*args: str,
|
||||||
locale: str = sync.config_get("locale"),
|
locale: str = "en",
|
||||||
locales_root: Union[str, Path] = Path("locale"),
|
locales_root: Union[str, Path] = Path("locale"),
|
||||||
) -> Any:
|
) -> Any:
|
||||||
"""Get value of locale string
|
"""Get value of locale string
|
||||||
@ -17,7 +17,7 @@ def _(
|
|||||||
### Args:
|
### Args:
|
||||||
* key (`str`): The last key of the locale's keys path.
|
* key (`str`): The last key of the locale's keys path.
|
||||||
* *args (`list`): Path to key like: `dict[args][key]`.
|
* *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")`.
|
* locales_root (`Union[str, Path]`, *optional*): Folder where locales are located. Defaults to `Path("locale")`.
|
||||||
|
|
||||||
### Returns:
|
### Returns:
|
||||||
|
Loading…
Reference in New Issue
Block a user