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

@@ -276,9 +276,12 @@ def status():
"""Show CowAgent running status."""
from cli import __version__
from cli.utils import load_config_json, get_cli_language
from common import i18n
# get_cli_language() calls ensure_sys_path(), which adds the project root
# to sys.path. Import `common` only AFTER that, otherwise it fails with
# ModuleNotFoundError when `cow` runs from outside the project dir.
get_cli_language() # resolve cow_lang so i18n.t reflects config
from common import i18n
_t = i18n.t
pid = _read_pid()