Skip to content

Commit

Permalink
Remove language from settings as it is not supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorWounds committed May 10, 2024
1 parent d1301da commit 46fa3aa
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
3 changes: 0 additions & 3 deletions cli/openbb_cli/config/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
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
Expand Down Expand Up @@ -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)
26 changes: 0 additions & 26 deletions cli/openbb_cli/controllers/settings_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class SettingsController(BaseController):
"console_style",
"flair",
"timezone",
"language",
"n_rows",
"n_cols",
"obbject_msg",
Expand Down Expand Up @@ -73,7 +72,6 @@ def print_help(self):
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")
Expand Down Expand Up @@ -223,30 +221,6 @@ def call_timezone(self, other_args: List[str]) -> None:
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(
Expand Down
1 change: 0 additions & 1 deletion cli/openbb_cli/models/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46fa3aa

Please sign in to comment.