Repository navigation
rust2(i18n): batch-1 — tr! keys for the 8 small wired commands + Ctx host seam (#1488) - #1636
Merged
Merged
Conversation
…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
marked this pull request as ready for review
November 14, 2026 08:26
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.
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.