Bilingual en / 中文 field pair (four labels)
The designs truth: every name is stored four times — System (English), System (Chinese), Printer (English), Printer (Chinese) — each required. Side by side on desktop, a “Chinese missing” flag (the factory bill would print English), tabs on phone.
Covers: M07. Exports: BilingualField.
Anatomy
The component as it sits in the product: English, compact, real data shapes.
Side by side in a list
Design index columns: English Name · Chinese Name (· Printer English · Printer Chinese). Missing Chinese is flagged, never auto-filled.
States
5 states, left to right, top to bottom. A mock poll never finishes, so each state is drawn on purpose.
Density
Compact (2b ultra, the default) and comfortable, side by side. Same markup, only the density tokens change.
English · 中文
Staff pick en or cn (T001 Q25). Labels arrive localised; CJK falls back to PingFang SC / Noto Sans SC.
Long string · permission denied
The long-string case (PL-063) and what a role without the permission sees (the server decides; T003).
Both apps
One @rj/admin-kit component, two themes: the Laravel admin (navy pinned) and the DTC admin (kit v4 Midnight green), by token swap only.
Contract
The @rj/admin-kit API for this family. Mirrored in CONTRACT.md.
- Export
BilingualField·@rj/admin-kit- Props
value{en, cn} ·printer{en, cn} (four-label mode) ·required·suggest(optional op)- States
- filled · focus · cn-missing · required-error · read-only
- shadcn / Radix
- Label + Input ×2 (×4) · Tabs on phone
- Package underneath
- react-hook-form · zod
- Accessibility
- each input is labelled with its language; lang=zh-Hans on the cn input
- API operations
- admin.designs.update (name, printer_name) · admin.design-components.* · admin.suppliers.* · admin.product-quality-checks.* · admin.vision-checks.failure-reasons.translate-suggest
- Phone variant
- tabs, one language at a time