Skip to content

rust2(i18n): batch-1 — tr! keys for the 8 small wired commands + Ctx host seam (#1488) - #1636

Merged
caomengxuan666 merged 1 commit into
mainfrom
rust2/i18n-batch1
Nov 14, 2026
Merged

caomengxuan666 merged 1 commit into
mainfrom
rust2/i18n-batch1

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

First real catalog migration per the 2.0 checkpoint's I18N prerequisite. 23 stable keys across whoami/arch/hostid/nproc/hostname/uname/id/getconf; Ctx gains injected HostServices (default-English fallback; named placeholders; params evaluate once; file content never crosses the translation seam).

Verification: driver diff 29/29 byte-stable; cargo winux-cmds --lib 703/0; extraction 3620 keys (delta +22 + 1 migration, zero fallback conflicts); extraction regressions 11/0.

Sequencing (captain-coordinated): i18n-drift on this PR will report 22 missing keys until companion catalog commit c58ee03 (unixwin/winuxcmd-i18n, VERSION 0.6.33) lands on the catalog repo's main. Merge order: this PR first, catalog immediately after; until then every other PR's drift stays green. After the catalog lands, PRs based on pre-batch1 sources will show the 23 as new extra drift until rebased — expected companion-repo dynamics.

Draft until the drift leg can be adjudicated at merge time.

…host seam (#1488)

First real catalog migration, per the 2.0 checkpoint's I18N
prerequisite:

- winux-core: Ctx gains an injected HostServices; Ctx::new keeps the
  default-English host, Ctx::with_host takes the caller's. tr! uses
  named placeholders and falls back to English on missing params,
  invalid fields, or broken templates; params evaluate once; file
  content never enters translation (host.rs, i18n.rs).
- whoami/arch/hostid/nproc/hostname/uname/id/getconf: 23 stable
  command.<cmd>.error.<what> keys with GNU error()-inner-wording
  fallbacks (program prefix stays in code). nproc's key migrates
  off the extractor's MANUAL positional entry (same key, named
  {raw}); zh-CN keeps its reviewed translation.
- Mechanical Ctx::new migration across canon/fs_win/nohup/pwd/rev/
  stat/timeout/users and the driver/ffi seams (struct-literal
  breakage, I18N seam closure).

Verification: driver diff 29/29 byte-stable across 8 commands;
cargo winux-cmds --lib 703/0; extraction 3620 keys (delta +22/+1
migration, zero fallback conflicts); extraction regressions 11/0;
i18n-drift OK (198 recorded, none new) against the companion
catalog commit (unixwin/winuxcmd-i18n c58ee03, held unpushed until
this lands — captain sequences the two).
@caomengxuan666
caomengxuan666 marked this pull request as ready for review November 14, 2026 08:26
@caomengxuan666
caomengxuan666 merged commit 7a24b01 into main Nov 14, 2026
14 of 15 checks passed
caomengxuan666 added a commit that referenced this pull request Nov 14, 2026
…#1488) (#1659)

Follows #1636: Ctx gained the injected host field, but that PR's CI
ran on a branch predating the xargs merge, so the three test-helper
struct literals (run_tty/run_bytes/run_in) escaped both legs and
broke the lib test build on main. Ctx::new(cwd, env) delegates to
with_host(DEFAULT_HOST) - byte-identical semantics.

cargo test -p winux-cmds --lib: compile restored; xargs 25/25.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant