Foundation · stable · v1.0.0 · owner: Site system lead · contract 18 of 20 points (open: usage, no owned-class occurrences in built pages or metadata-token references in built CSS; application declarations and executed coverage are separate; figma)
Reference
Source reference; not an executed check.
ja review- banner on every Japanese page
English only- (英語)
Do and don't
2 positive / 2 negative authored documentation examples (2 each required); 1 reference (1 required); 0 failed. References and failures do not count; this is not behavior acceptance.
Do: Japanese navigation names its real path
Authored by localisation.tsRendered consumer example; not an executed correctness check. breadcrumbs Isolated document follows the browser's colour and contrast preferences. The outer theme toolbar does not control this document.
Open example: Localisation · Do: Japanese navigation names its real path Use the full-page example to follow page links.
Do: Keep the review-pending statement
Authored by localisation.tsRendered consumer example; not an executed correctness check. caption Isolated document follows the browser's colour and contrast preferences. The outer theme toolbar does not control this document.
Open example: Localisation · Do: Keep the review-pending statement Use the full-page example to follow page links.
Don't: A new string has no Japanese counterpart
Authored by localisation.tsRule illustration; not an executed check. localisation / l10n.every-string
Proposed new English action: "Review the changes"
Japanese counterpart: absent.
The new string is submitted as complete despite the missing locale.Don't: Translated text is clipped to the English width
Authored by localisation.tsRule illustration; not an executed check. localisation / l10n.expansion
.translated-heading { white-space: nowrap; overflow: hidden; }
Longer Japanese wording disappears instead of growing downwards.Rules
| Rule | Why | Check |
|---|---|---|
| Every new string has its Japanese. | Japanese readers are a launch audience. | Automated: npm run site:copy (localisation rules) |
| Layouts survive 40% text expansion. | Translations are longer; nothing may overflow. | Review: Site system lead: whole-system element and template expansion review remains unrun. tests/site/identity.spec.ts covers selected V4 captions and diagrams at 390, 768, 1024 and 1440 px in both languages; it does not cover every Library specimen. |
API
No props.
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | localisation |
| Layer | Foundations |
| Category | foundation |
| Owner | Site system lead |
| Status | stable |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/foundations/localisation.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | Localisation as one module: its markup moved out of the page builder (scripts/site) into the system. |
Use when
- Every new string. Why: Every new string ships with its Japanese.
Do not use when
- Engine output and code. Why: Shown as is, in English, and said so.
Anatomy
| Part | What it is |
|---|---|
| pages | apps/showcase/site-content/ja |
| nav | scripts/site/nav-ja.ts |
| breaks | jaBreaks in the page shell |
| pseudo | 40% text expansion is required for the whole system. tests/site/identity.spec.ts checks selected V4 captions and diagrams; the remaining element and template matrix is unrun. |
Made of: nothing (a base element).
Used in: pages directly.
Variants
| Variant | When | Why |
|---|---|---|
| light and dark | Every page, following the reader's setting. | The same roles resolve to light or dark values, so no element chooses its own. |
States
| State | Rendered or not applicable |
|---|---|
| default | The specimen. |
| hover | Not applicable: A foundation is not interactive. |
| focus-visible | Not applicable: Not focusable. |
| active | Not applicable: Not interactive. |
| disabled | Not applicable: Nothing to disable. |
| loading | Not applicable: Values are built into the stylesheet. |
| empty | Not applicable: The build fails if a value is missing. |
| error | Not applicable: Unresolved values fail the brand gate, not the reader. |
| current | Not applicable: No current item. |
| visited | Not applicable: Not a link. |
| expanded | Not applicable: Does not open. |
Tokens
| Part | Token |
|---|---|
| note.ja-review | このページの日本語は、ネイティブスピーカーによる確認前の翻訳です。 |
Layout
| Aspect | Value |
|---|---|
| breakpoints | Required review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; columns stack under 768 px; the wrap keeps a 16 px gutter on phones. |
| wrapping | Text wraps; nothing scrolls sideways. |
| textExpansion | Japanese runs 20 to 40% longer; headings break between phrases (jaBreaks) and blocks grow downwards. |
Spacing and rhythm
| Aspect | Value |
|---|---|
| internal | Not applicable: a foundation has no box of its own. |
| external | Not applicable. |
| rhythm | Applies to every element that reads it. |
Motion
| Aspect | Value |
|---|---|
| None | A foundation does not move. |
Runtime and reuse
Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.
Accessibility passport
| Aspect | Value |
|---|---|
| role | Not rendered on the site; its specimen in the Library is a list |
| name | The foundation's name |
| keyboard | Not interactive. |
| focus | Not focusable. |
| screenReader | The specimen is a plain list of names and values. |
| contrast | Every text and ground pair in the palette is checked (check-brand). |
| target | Not a target. |
Content
| Slot | Length | Voice |
|---|---|---|
| Japanese review note (existing content token) | The complete note.ja-review wording; never shorten away pending review | State that the translation has not had native review. The page shell owns rendering the note. |
| English-only destination label | The destination label plus the existing (英語) marker | Name the actual language of the destination; do not imply a missing Japanese route exists. |
Good: “このページの日本語は、ネイティブスピーカーによる確認前の翻訳です。” · “(英語)”
Bad: “Japanese approved (when native review is still pending)” · “A Japanese link label pointing at an unimplemented translated route”
Japanese: Japanese pages are awaiting native review, as their banner says. Preserve glossary terms, source language and English-only destination markers. The forty-percent expansion rule is an obligation; its whole-system matrix remains unrun as recorded above.
Icons and illustrations
None: this element uses no icon or illustration of its own.
Decisions and exceptions
Usage
0 owned-class occurrences in built pages plus metadata-token references in built CSS (measured by npm run site:system).
Application and coverage
Content policy (declared): The page shell renders note.ja-review and Japanese phrase breaks. copy-governance.ts inspects review records and the source note declaration; site-ja-review-note is accepted/error and supported error findings block the strict copy CLI. Source-change findings remain warnings; string/expansion checks do not establish every rendered layout or native approval.
Current check result: not assessed by this report. Declarations and source-file presence do not establish executed enforcement or accepted coverage.
Source authority and implementation (paths in the private checkout):
scripts/site/pages.tsscripts/site/templates.tsscripts/site/copy-governance.tsscripts/site/check-copy.tsapps/showcase/site/loom/rules/site-ja-review-note.json
Declared rules and checks (not execution results):
l10n.every-string: Every new string has its Japanese. Automated check declared: npm run site:copy (localisation rules)l10n.expansion: Layouts survive 40% text expansion. Review declared: Site system lead: whole-system element and template expansion review remains unrun. tests/site/identity.spec.ts covers selected V4 captions and diagrams at 390, 768, 1024 and 1440 px in both languages; it does not cover every Library specimen.
Coverage still needed (not assessed here):
- Retain current strict-copy output, missing/unsupported note and review-record canaries in tests/unit/site-copy-enforcement.test.ts, and actual Japanese review-note rendering.
- Whole-system 40% rendered text expansion and native-language review remain unrun beyond the separately recorded selected V4 checks; AI review is not native approval.
Tests
| Aspect | Value |
|---|---|
| unit | tests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns |
| visual | Not yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts |
| a11y | tests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark |
| parity | scripts/site/system/check.ts: Library examples are rendered by the same render function the site imports |
Figma
not-yet: The Loom Site Figma library is the last stage of the plan; this element is not mapped yet.