F182 B3: i18n sweep — inventory domain (Inventory, Products, Stock, Flocks) — stacked on #239#240
Merged
Merged
Conversation
18 tasks
added 5 commits
July 27, 2026 00:09
Move every user-facing string in InventoryPage.tsx into a new flat
`inventory` namespace in en.ts (English-only, 60 keys), following the
Screen Externalization Pattern from B1/B2. Wires category and status
displays through the B0 enum helpers (inventoryCategoryLabel,
statusLabel), and the movement ledger's Type cell through
inventoryMovementLabel — while keeping the Correct-stock dialog's
decorated Type picker options ("Adjustment (±)", "Discard (write-off)")
as plain screen copy, since that text is not the ledger's identity
label. All enum families are identity-mapped in English today, so the
retrofit is text-preserving.
Adds 11 i18n-wiring tests (i18n.addResource override technique) on top
of the unchanged, still-green functional suite, including a pair of
tests that prove the adjust-type picker reads screen copy rather than
the movement enum. i18n:scan count drops from 707 to 645.
Task 17 (batch B3, the last B3 screen): moves every user-facing string in ProductsPage.tsx into a new flat `products` namespace in en.ts (English-only, not in TRANSLATED_NAMESPACES). Wires both the products table's StatusBadge and the packed-unit table's plain-text status cell through the shared statusLabel enum helper; unitCode/defaultUnit and product/grade names stay raw as free-form farm data. Adds i18n.addResource wiring tests covering the heading, button labels, both status-enum sites, the two data-interpolated templates (price-with-currency label, eggs-per-unit dialog title), and the price-precision validation message.
Adds the `stock` namespace (English-first, not in TRANSLATED_NAMESPACES) and wires the movement ledger's Type cell through the B0 stockMovementLabel helper. Grade/lot names, dates, and quantity/delta values stay raw farm data.
Adds the `flocks` namespace (English-first) and wires the bird-ledger movement-type select/cells through flockMovementLabel and the status badge through statusLabel — the last B3 screen of the i18n sweep.
mforce
force-pushed
the
f182-i18n-b3-inventory
branch
from
July 27, 2026 07:10
14a6417 to
51ea767
Compare
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.
B3 — inventory domain. Fourth batch of the #182 string sweep. Externalizes the four inventory-domain screens to the catalog, English-first, wiring their closed-vocabulary displays through the B0 typed
enumshelpers.Screens externalized (English-only namespaces)
inventory(~60 keys) — items, categories, movement ledger, correct-stock dialog. Category →inventoryCategoryLabel; the ledger movement cell →inventoryMovementLabel; Active/Inactive →statusLabel. The correct-stock Type picker's decorated labels ("Adjustment (±)", "Discard (write-off)") stay as screen copy (2 tests prove the picker is not routed through the enum helper).products— product catalog + packed-unit conversions; status viastatusLabel(table badge + packed-units cell);unitCode/defaultUnit/names stay raw data;Eggs per {{unitCode}}interpolates the raw value.stock— by-grade balances → lots → movement ledger; movement cell viastockMovementLabel(8 values).flocks— roster + bird ledger; movement (picker + ledger) viaflockMovementLabel, lifecycle status viastatusLabel; names/breeds raw.Guarantees held
en.ts-only, not inTRANSLATED_NAMESPACES— parity green.StatusBadgestatus=stays raw (pill tint unchanged); only the translatedlabel=is added.i18n.language/Intlin any screen; formatting-independence guard passes.unitCode, lot numbers) stays raw. Nocommonatom duplicated.Testing / review
Wiring tests use the
i18n.addResourceoverride technique (a hardcoded literal fails — verified by reverted mutation probes on each screen).npm run test838 green; coverage above the (unchanged) floors — no locked path touched;npm run typecheckclean;npm run buildsucceeds. Each of the 4 screens was individually reviewed (spec + quality, with empirical probes); then a whole-branch review (Claude comprehensive — READY, zero findings).Not in scope
es/tl for these screens (deferred native-review pass, #182); the sale-unit vocabulary staying raw English (documented B0 deferral); B4–B6.