Resident ready Static companion
kari_mikumao Lab

Tooling

Mirai Guide: three languages without a translation CMS

UI catalogs that fail loudly, i18n columns for structure, and reviewed model translation for the catalog.

  • mirai-guide
  • localization
  • i18n

Mirai Guide serves Japanese, English, and Chinese from one deployment. Localization is split into three layers with different correctness guarantees, because interface strings, venue structure, and extracted catalog text fail in different ways.

Layer 1: UI catalogs that fail loudly

Interface strings live in per-locale JSON catalogs that are bundled eagerly at build time. Enabling a locale without committing its catalog fails at build rather than rendering undefined strings, and t() falls back to Japanese key-by-key. A locale registry decides which bundled languages an operator has revealed to attendees — the registry can never conjure a language that has no catalog behind it.

Two details carry the polish:

  • Templated strings use {name} placeholder interpolation instead of concatenation, so word order stays a per-locale translation decision.
  • Chinese display grouping is explicit: with both variants enabled, the picker shows 简 and 繁; a lone zh still reads 简 rather than presenting 中文 with no choice behind it.

Layer 2: structure names as i18n columns

Venue and structure names are stored as JSON i18n objects ({ ja, en, zh }) validated at the database level, with Japanese as the authoritative source language. Presentation resolves through the same fallback chain as the UI, so a missing translation degrades to Japanese, never to an empty label.

Layer 3: reviewed model translation for the catalog

Vendor and product names arrive from Japanese sources at event scale — far too much for hand translation, far too important for blind machine output. OpenAI structured outputs produce Japanese, English, and Chinese names and descriptions together with evidence, and those land in the same review queue as everything else. Model output never publishes itself; a human approves each proposal against the source context it was extracted from.

The result is one property that holds across all three layers: at every level, the failure mode of missing localization is showing correct Japanese — never a blank, never an unreviewed guess.