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.
States
5 states, left to right, top to bottom. A mock poll never finishes, so each state is drawn on purpose.
Density
The phone shell is always comfortable (POWERUPS #15): 44px tap targets, 16px inputs. Compact exists on desktop only; see the desktop page.
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).
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