chore(messages): TransPyV 运行时中文字符串英文化

把 TransPyV/App 下 57 个文件的运行时中文字符串(编译器报错/告警/日志、CLI 帮助与横幅、REPL 提示、Phase1/Phase2 流程日志、Codegen 各 Mixin 的类型与调用报错、Stub/Vpi 诊断等)共 1091 行译为英文。

口径:只改字符串字面量内部文字,行数零变化(+1092/-1092);printf 格式符与转义序列多重集合校验不变(_strcheck 异常 0);译文不引入撇号以免干扰单引号字面量解析。验证:三重重编 SUCCESS(136.20s)+ 全量 77/77 顺序回归通过 + VET 编译 SUCCESS / --search-paths 7 条 exit 0;新产物 help/日志输出已为英文。
This commit is contained in:
TermiNexus committed 2026-10-07 00:03:58 +08:00
1 parent 0cf80632c1
commit 7a9bc5ae75
57 files changed
+1092 -1092

No files matched your search

+10 -10
View File
@@ -72,7 +72,7 @@ def _AppendDepsToWorklist(worklist: bytes, wl_len: sizet, deps_str: str, process
worklist[cur_len] = '\0'
else:
stdlib.free(dmod)
VLogger.error("依赖 worklist 溢出", "StubMerger")
VLogger.error("dependency worklist overflow", "StubMerger")
return -1
stdlib.free(dmod)
return int(cur_len)
@@ -83,7 +83,7 @@ def _BuildReachableSha1Set(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str,
"""Build the reachable SHA1 set by on-demand dependency-graph scanning."""
if source_dir is None or temp_dir is None or reachable_set is None: return -1
if includes_dirs is None:
VLogger.error("includes_dirs 缺失,无法按需解析依赖图", "Reachable")
VLogger.error("includes_dirs is missing; cannot resolve the dependency graph on demand", "Reachable")
return -1
SRC_BUF_SIZE_R: sizet = 1048576
@@ -96,7 +96,7 @@ def _BuildReachableSha1Set(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str,
# 1. App scan (skipped when app_deps is non-empty; use the caller-provided initial queue directly)
if app_deps is None or app_deps[0] == '\0':
VLogger.info("App 扫描:解析 source_dir 的 import 依赖", "Reachable")
VLogger.info("App scan: resolving import dependencies of source_dir", "Reachable")
scan_res_r: IncludesScanner.ScanResult* = IncludesScanner.scan_includes(mb, source_dir)
if scan_res_r is not None:
es_r: sizet = IncludesScanner.FileEntry.__sizeof__()
@@ -176,7 +176,7 @@ def _BuildReachableSha1Set(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str,
string.strcpy(worklist, app_deps)
wl_len = ad_len
else:
VLogger.error("app_deps 过长,无法构建可达集合", "StubMerger")
VLogger.error("app_deps is too long; cannot build the reachable set", "StubMerger")
stdlib.free(worklist)
return -1
@@ -212,7 +212,7 @@ def _BuildReachableSha1Set(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str,
if tb_inc is not None: stdlib.free(tb_inc)
if tb_found != 0:
stdlib.free(worklist)
VLogger.error(f"--traceback: 在 includes 目录中找不到 traceback.vp,无法编译并链接 Install()(请确认 project.vpj 的 includes 包含仓库 includes 目录;已扫描: {includes_dirs})", "Traceback")
VLogger.error(f"--traceback: traceback.vp not found in the includes dirs; cannot compile and link Install() (make sure the includes of project.vpj contains the repository includes directory; scanned: {includes_dirs})", "Traceback")
return -1
tb_wl: int = _AppendDepsToWorklist(worklist, wl_len, "traceback", None)
if tb_wl < 0:
@@ -264,7 +264,7 @@ def _BuildReachableSha1Set(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str,
proc_len = proc_len + 1
processed[proc_len] = '\0'
else:
VLogger.error("依赖 processed 溢出", "StubMerger")
VLogger.error("dependency processed overflow", "StubMerger")
stdlib.free(mod_buf)
continue
@@ -383,7 +383,7 @@ def _BuildReachableSha1Set(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str,
# parse_tokens keeps the error detail (line/col/message) only in the global channel, so print the unified
# parse traceback before the one-line log; without it a reachable-includes syntax error is undiagnosable.
GenApi.dump_parse_traceback(abs_path)
VLogger.error(f"可达 includes 解析失败: {abs_path}", "Reachable")
VLogger.error(f"reachable includes parse failed: {abs_path}", "Reachable")
stdlib.free(abs_path)
stdlib.free(rel_path)
stdlib.free(inc_dir)
@@ -421,7 +421,7 @@ def _BuildReachableSha1Set(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str,
GenApi.reset_visible_structs(mb, 0)
ret_r2: int = tr_r2.translate(tree_r)
if ret_r2 != 0:
VLogger.error(f"import 依赖扫描失败(可达 includes): {abs_path}", "Reachable")
VLogger.error(f"import dependency scan failed (reachable includes): {abs_path}", "Reachable")
stdlib.free(abs_path)
stdlib.free(rel_path)
stdlib.free(inc_dir)
@@ -471,7 +471,7 @@ def _BuildReachableSha1Set(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str,
mb.reset_to(scan_mark_r)
return -1
wl_len = sizet(ret_w)
else: VLogger.debug(f"无依赖: {rel_path}", "Reachable")
else: VLogger.debug(f"no dependencies: {rel_path}", "Reachable")
# Free the Translator's C malloc resources and reclaim this file's AST
if tr_r2._global_names is not None: stdlib.free(tr_r2._global_names)
@@ -506,7 +506,7 @@ def LoadFullIR(temp_dir: str, sha1: str, out_buf: bytes, out_size: sizet) -> siz
if f.closed: return 0
if f.size() >= out_size:
f.close()
VLogger.error("full.ll 超过 IR 缓冲上限", "StubMerger")
VLogger.error("full.ll exceeds the IR buffer limit", "StubMerger")
return 0
rd: int64 = f.read_all(out_buf, out_size)
f.close()