feat(installer): revamp install flow with i18n

This commit is contained in:
zhayujie
2026-05-31 20:11:23 +08:00
parent 7bf4ef3d05
commit 9e6a2cc2c0
6 changed files with 1066 additions and 444 deletions

View File

@@ -518,9 +518,11 @@ def _install_targz_bytes(content: bytes, name: str, skills_dir: str, result: Ins
def _print_install_success(name: str, source: str):
"""Print a unified install success message with description and source."""
from cli.utils import get_cli_language
from common import i18n
# Import `common` only after get_cli_language() runs ensure_sys_path(),
# so it works when `cow` is invoked from outside the project directory.
get_cli_language() # resolve cow_lang so i18n.t reflects config
from common import i18n
_t = i18n.t
skills_dir = get_skills_dir()