Remove language from settings as it is not supported.

This commit is contained in:
Igor Radovanovic
2024-05-10 13:49:13 +02:00
parent d1301da644
commit 46fa3aaba4
3 changed files with 0 additions and 30 deletions

View File

@@ -7,7 +7,6 @@ from typing import TYPE_CHECKING, List, Optional, TypeVar
import i18n
from openbb_cli.config.constants import ENV_FILE_SETTINGS, I18N_FILE, SETTINGS_DIRECTORY
from openbb_cli.session import Session
if TYPE_CHECKING:
from openbb_charting.core.openbb_figure import OpenBBFigure
@@ -81,5 +80,3 @@ def bootstrap():
"""Setup pre-launch configurations for the CLI."""
SETTINGS_DIRECTORY.mkdir(parents=True, exist_ok=True)
Path(ENV_FILE_SETTINGS).touch(exist_ok=True)
setup_i18n(lang=Session().settings.USE_LANGUAGE)

View File

@@ -36,7 +36,6 @@ class SettingsController(BaseController):
"console_style",
"flair",
"timezone",
"language",
"n_rows",
"n_cols",
"obbject_msg",
@@ -73,7 +72,6 @@ class SettingsController(BaseController):
mt.add_cmd("console_style")
mt.add_cmd("flair")
mt.add_cmd("timezone")
mt.add_cmd("language")
mt.add_cmd("n_rows")
mt.add_cmd("n_cols")
mt.add_cmd("obbject_res")
@@ -223,30 +221,6 @@ class SettingsController(BaseController):
elif not other_args:
session.console.print(f"Current timezone: {session.settings.TIMEZONE}")
def call_language(self, other_args: List[str]) -> None:
"""Process language command."""
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prog="language",
description="Change your custom language.",
add_help=False,
)
parser.add_argument(
"-l",
"--language",
dest="language",
action="store",
required=False,
type=str,
)
ns_parser = self.parse_simple_args(parser, other_args)
if ns_parser and ns_parser.language:
session.settings.set_item("USE_LANGUAGE", ns_parser.language)
elif not other_args:
session.console.print(f"Current language: {session.settings.USE_LANGUAGE}")
def call_n_rows(self, other_args: List[str]) -> None:
"""Process n_rows command."""
parser = argparse.ArgumentParser(

View File

@@ -34,7 +34,6 @@ class Settings(BaseModel):
# GENERAL
TIMEZONE: str = "America/New_York"
FLAIR: str = ":openbb"
USE_LANGUAGE: str = "en"
PREVIOUS_USE: bool = False
N_TO_KEEP_OBBJECT_REGISTRY: int = 10
N_TO_DISPLAY_OBBJECT_REGISTRY: int = 5