D27: infrastructure/cli/i18n → infrastructure/i18n; снята зависимость AI от CLI
This commit is contained in:
1 parent
9c069b9e7f
commit
bd23b03c08
20 files changed
+108
-26
No files matched your search
@@ -1,4 +1,4 @@
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.i18n import t
|
||||
|
||||
ANALYZE_PROMPT = t("prompt.analyze")
|
||||
ADVICE_PROMPT = t("prompt.advice")
|
||||
|
||||
@@ -21,9 +21,9 @@ from infrastructure.cli.commands import (
|
||||
scenario,
|
||||
whatif,
|
||||
)
|
||||
from infrastructure.cli.i18n import setup_i18n, t
|
||||
from infrastructure.i18n import setup_i18n, t
|
||||
|
||||
setup_i18n() # язык уже определён при импорте infrastructure.cli.i18n (D20)
|
||||
setup_i18n() # язык уже определён при импорте infrastructure.i18n (D20)
|
||||
|
||||
app = typer.Typer(name="cf", help=t("app.help"))
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import typer
|
||||
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.services import build_services, console, load_model, resolve_currency
|
||||
from infrastructure.i18n import t
|
||||
|
||||
CURRENCY_OPTION = typer.Option(None, "--currency", "-c", help=t("cmd.forecast.opt.currency"))
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import typer
|
||||
from pydantic import ValidationError
|
||||
from rich.table import Table
|
||||
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.services import (
|
||||
build_services,
|
||||
console,
|
||||
@@ -14,6 +13,7 @@ from infrastructure.cli.services import (
|
||||
load_model,
|
||||
resolve_currency,
|
||||
)
|
||||
from infrastructure.i18n import t
|
||||
|
||||
CURRENCY_OPTION = typer.Option(None, "--currency", "-c", help=t("cmd.forecast.opt.currency"))
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ from domain import (
|
||||
RecurringCashflow,
|
||||
Transaction,
|
||||
)
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.services import console, fail_validation, load_model, save_model
|
||||
from infrastructure.i18n import t
|
||||
|
||||
app = typer.Typer(name="config", help=t("config.help"))
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import typer
|
||||
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.paths import AppPaths
|
||||
from infrastructure.cli.services import console, load_model
|
||||
from infrastructure.i18n import t
|
||||
from infrastructure.repositories import ExcelRepository, ExcelRepositoryError
|
||||
|
||||
_repo = ExcelRepository()
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import typer
|
||||
from rich.table import Table
|
||||
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.services import (
|
||||
build_services,
|
||||
console,
|
||||
@@ -12,6 +11,7 @@ from infrastructure.cli.services import (
|
||||
load_model,
|
||||
resolve_currency,
|
||||
)
|
||||
from infrastructure.i18n import t
|
||||
|
||||
CURRENCY_OPTION = typer.Option(None, "--currency", "-c", help=t("cmd.forecast.opt.currency"))
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import typer
|
||||
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.services import console, save_model
|
||||
from infrastructure.i18n import t
|
||||
from infrastructure.repositories import ExcelRepository, ExcelRepositoryError
|
||||
|
||||
_repo = ExcelRepository()
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
from rich.table import Table
|
||||
|
||||
from domain import CurrencyConverter
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.services import console, load_model
|
||||
from infrastructure.i18n import t
|
||||
|
||||
|
||||
def info() -> None:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""cf init — создать пустую модель."""
|
||||
|
||||
from domain import FinancialModel
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.paths import AppPaths
|
||||
from infrastructure.cli.services import console, save_model
|
||||
from infrastructure.i18n import t
|
||||
|
||||
|
||||
def init() -> None:
|
||||
|
||||
@@ -4,7 +4,6 @@ import typer
|
||||
from pydantic import ValidationError
|
||||
|
||||
from application.scenarios import DEFAULT_SCENARIOS
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.services import (
|
||||
build_services,
|
||||
console,
|
||||
@@ -14,6 +13,7 @@ from infrastructure.cli.services import (
|
||||
load_model,
|
||||
resolve_currency,
|
||||
)
|
||||
from infrastructure.i18n import t
|
||||
|
||||
CURRENCY_OPTION = typer.Option(None, "--currency", "-c", help=t("cmd.forecast.opt.currency"))
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import typer
|
||||
from pydantic import ValidationError
|
||||
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.services import (
|
||||
build_services,
|
||||
console,
|
||||
@@ -13,6 +12,7 @@ from infrastructure.cli.services import (
|
||||
load_model,
|
||||
resolve_currency,
|
||||
)
|
||||
from infrastructure.i18n import t
|
||||
|
||||
CURRENCY_OPTION = typer.Option(None, "--currency", "-c", help=t("cmd.forecast.opt.currency"))
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ from application.forecast import ForecastService
|
||||
from application.scenarios import ScenarioService
|
||||
from domain import CurrencyConverter, FinancialModel
|
||||
from infrastructure.ai.assistant import AssistantService
|
||||
from infrastructure.cli.i18n import t
|
||||
from infrastructure.cli.paths import AppPaths
|
||||
from infrastructure.i18n import t
|
||||
from infrastructure.repositories import JsonFileRepository
|
||||
|
||||
console = Console()
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
import os
|
||||
|
||||
from infrastructure.cli.i18n.en import MESSAGES as _EN_MESSAGES
|
||||
from infrastructure.cli.i18n.ru import MESSAGES as _RU_MESSAGES
|
||||
from infrastructure.i18n.en import MESSAGES as _EN_MESSAGES
|
||||
from infrastructure.i18n.ru import MESSAGES as _RU_MESSAGES
|
||||
|
||||
_TRANSLATIONS: dict[str, dict[str, str]] = {"ru": _RU_MESSAGES, "en": _EN_MESSAGES}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user