Skip to content

i18n: move UI translations to versioned DB ledger and complete 8-locale coverage #922

Open

Description

@seonghobae

Buyer-visible gap

LineageWeave currently declares only en, ko, zh, ja, and vi in frontend/src/i18n.ts, and translation resources are compiled into the SPA source. The product contract requires KO/EN/JA/ZH/VI/ES/DE/FR and a database-distributed, versioned translation ledger with screen-key caching; ontology labels remain a separate semantic concern.

This is a LineageWeave presentation/read-model boundary. Do not copy ontology truth, locale management, or other CWL owners into this repository. If a released shared i18n owner becomes available, consume it through a versioned contract/ACL instead of duplicating it.

Required repair

  1. Add es, de, and fr as first-class supported locales without treating English fallback as translated coverage.
  2. Replace the SPA-bundled translation dictionary as the production source of truth with a normalized PostgreSQL translation ledger. Keep the client payload scoped by product/screen/key/locale/version and cache by immutable/versioned ledger identity so locale switching does not require shipping the full translation corpus in the JS bundle.
  3. Preserve English source keys as stable message identities for the migration only if an ADR demonstrates collision/versioning safety; otherwise introduce an explicit stable message key and migrate callers without breaking existing accessibility names.
  4. Keep ontology labels out of the translation ledger. Translation records are presentation resources, not semantic ontology truth.
  5. Fail closed on missing required production translations for the eight supported locales in release/build evidence; development fallback must be explicit and observable, not silently counted as coverage.
  6. Verify KO/EN/JA/ZH/VI/ES/DE/FR text expansion, CJK rendering/font fallback, normal/loading/empty/error/permission states, responsive layouts, keyboard/focus semantics, and screen-reader names for material UI.
  7. Add migration/rollback, seed/version provenance, cache invalidation semantics, tenant/scope rules if applicable, API/read-model contract, and operational evidence. No cross-service SQL.
  8. Update PRD/TRD/ARCHITECTURE/ADR/UX/OPERABILITY/TEST_STRATEGY and docs/product-technical-gap-baseline.md code-current with the chosen transaction/cache/version boundary.

RED acceptance

  • A contract test must demonstrate that SUPPORTED_LOCALES is missing es, de, and fr on current code.
  • A packaging/build assertion must demonstrate that production translation payloads currently live in the frontend source/bundle rather than a versioned database resource.
  • An i18n completeness test must distinguish a real translation from English fallback and fail when any required screen key is missing in one of the eight supported locales.

GREEN acceptance

  • SUPPORTED_LOCALES contains exactly the supported product locales KO/EN/JA/ZH/VI/ES/DE/FR (canonical locale tags documented).
  • Production translations are read through the versioned DB-ledger/API boundary and screen-key cache; the frontend bundle is not the canonical translation store.
  • Full current-head i18n/accessibility tests cover all eight locales and all material states; no untranslated fallback is counted as translated coverage.
  • Migration rollback and immutable/versioned resource provenance are demonstrated on current head.
  • No ontology-label conflation, raw cross-service SQL, or mutable sibling dependency is introduced.

Open material-UI lanes covered by this gate

At the 2026-09-03 live sweep, this release gate applies to open material UI work including #667 (Ask history), #679 (public-claim verification), #770 (project-history timeline), #774 (Operations Dashboard status), #802 (leftover-map explained-share presentation), #903 (Event Lineage), #907 (Affiliate Tree), #909 (Customer Master), and the #918 → #920 → #921 leftover-map composition stack. These PRs retain their own domain/test findings, but none may count five-locale SPA-bundled predecessor evidence as completion of this eight-locale DB-ledger requirement. Keep conflicts and unique deltas repairable; do not close them merely because this shared presentation prerequisite is unfinished.

Activity

  1. seonghobae commented on Sep 3, 2026

    @seonghobae
    ContributorAuthor

    Starting the RED/GREEN repair this cycle on a main-targeting branch (feat/i18n-translation-ledger-eight-locales, ADR 0357 / v2.31.0). Stacked leftover-map origin ADRs 0272–0356 stay on #921 and descendants; this increment does not mix into that stack. Canonical locales: en ko ja zh vi es de fr. Production translations persist to a versioned PostgreSQL ledger with screen-key cache identity; English source keys remain message identities only when they equal the en translated string. English fallback is not translated coverage for the other seven locales. Ontology labels stay out of the ledger.

  2. seonghobae commented on Sep 3, 2026

    @seonghobae
    ContributorAuthor

    Cycle 2026-09-03T05:01Z: writes work this cycle (comment/create-branch). Independent of leftover-map origin stack #912–#921 (ADR 0272–0356).

    Implementing ADR 0357 / v2.31.0 on feat/i18n-translation-ledger-eight-locales (from main@0f1d447):

    • 8 locales en/ko/ja/zh/vi/es/de/fr
    • 3NF ledger ui_product / ui_screen / ui_locale / ui_message_key / ui_ledger_edition / ui_translated_string (migration 0246)
    • cache identity {product}:{screen}:{locale}:{edition}
    • English source keys as message identities; English fallback is not coverage
    • ontology labels stay out of the ledger
    • synthetic fixture lineageweave/fixtures/ui_translated_strings.json (edition 1)
    • GET /api/ui-translations read model

    Never invent a leftover score or a theta. No self-approve. Draft PR onto main after tests + push. Independent exact-head APPROVE required before squash-merge.

  3. seonghobae commented on Sep 3, 2026

    @seonghobae
    ContributorAuthor

    #929 now carries the #922 persistence/read-model foundation on exact protected base b0e94aa2a6f7a943f96dc5c4f2fdecd0021978a1.

    Implemented under Draft:

    • normalized versioned ui_translation_resource / ui_translation_key / ui_translation_text schema;
    • persisted member-locale admission expanded to ko/en/ja/zh/vi/es/de/fr;
    • published-resource immutability and complete key×8-locale publication gate;
    • PostgreSQL-authoritative read model with exact product/screen/version/locale Valkey cache identity and fail-closed missing copy;
    • publication/child-write serialization after a review-found race (370f83a... RED → bb61753... fix);
    • Proposed ADR 0362 with BCP 47 / RFC 5646 traceability and non-destructive recovery semantics;
    • edge coverage through current feat: establish versioned UI translation ledger foundation #929 head ba7af630b390c5edf33bc112bc624d56f28d0b09.

    #922 stays open. Buyer-visible completion still requires FastAPI locale-request admission and frontend/src/i18n.ts to stop using the old five-locale/bundled-copy contract, actual screen-resource seeding/versioning, and current-head 8-locale normal/loading/empty/error/permission/responsive/a11y evidence. Current #929 checks are non-terminal, so no Ready/merge claim is being made.

  4. seonghobae commented on Sep 3, 2026

    @seonghobae
    ContributorAuthor

    #929 advanced the DB-ledger/read-model foundation, but #922 remains open. Review of predecessor ba7af630b390c5edf33bc112bc624d56f28d0b09 found that an exact-identity Valkey payload could contain only a subset of a published screen's required keys and still bypass PostgreSQL. RED 3b68e4ed16731e97e8743748ab5775fa78240064 captures the partial-cache case; repair 249b6cfba21c37899cae10ee7519d4e77132269d now resolves the published required-key set from PostgreSQL before accepting an explicit-version cache hit and requires exact key-set equality; verification-contract alignment is f666a5b12b9ddd0bbef040c238ef541ec1fa1af1. ADR 0362 is code-current at 7df347874ae26b95947be14b0cb97d7789b8d07a and remains Proposed. Buyer-visible completion is still gated on released foundation + API/frontend cutover, actual versioned screen resources, and eight-locale UI/a11y evidence.

  5. seonghobae commented on Sep 3, 2026

    @seonghobae
    ContributorAuthor

    #929 foundation progressed beyond the earlier cache repair. Current exact head 00896929ab67427c53f7809b533857e65ab20ca7 now also rejects padded PostgreSQL product/screen identities (RED d75d0a96... → repair d4d03da3...) and makes immutable publication provenance database-owned. A new real-PostgreSQL test path (d982d265...) applies migrations 0001 + 0044 + 0246 in a throwaway DB and verifies canonical identity, publication immutability/provenance, and eight-locale completeness. That runtime test exposed PostgreSQL now() as transaction-start time; RED 74f0521b... → repair e2429b14... now uses statement_timestamp() so a long transaction cannot backdate the publication receipt. ADR 0362 remains Proposed. #922 stays open: API/frontend cutover, versioned production screen resources, eight-locale material-state/a11y evidence, and the wider code-current product/technical docs are still outstanding.

  6. added a commit that references this issue on Sep 9, 2026
  7. seonghobae commented on Sep 11, 2026

    @seonghobae
    ContributorAuthor

    Current i18n foundation/consumer state after fresh review and non-force convergence:

    Issue #922 remains open. The database-ledger foundation still does not prove a complete reviewed/published customer-master resource for all ko/en/ja/zh/vi/es/de/fr, and the product-wide locale selector remains limited to product-complete ko/en/ja/zh/vi rather than pretending untranslated surfaces satisfy eight-locale product coverage. No English fallback is counted as translated coverage.

  8. seonghobae commented on Sep 11, 2026

    @seonghobae
    ContributorAuthor

    Fresh consumer evidence from #858: exact head 2689a80f09aa0f47444b2daeddae24882ae9667b keeps a behavior-level Vitest RED for the grouping-comparison rank accessible name across ko/zh/ja/vi. The current branch falls back to the English key for that new screen-reader label. I removed an intermediate test that required literal entries in frontend/src/i18n.ts, because that would incorrectly make the SPA dictionary the production authority and conflict with this issue's DB-ledger/screen-key-cache contract. Treat historical v2.75 translations only as semantic copy evidence; GREEN for #858 should come from the current canonical translation boundary without English fallback or a competing static authority.

  9. seonghobae commented on Sep 17, 2026

    @seonghobae
    ContributorAuthor

    2026-09-17 live repair update: #929 now has an executable Customer Master eight-locale review candidate rather than only the generic ledger foundation.

    RED eb6eca97df64656ab0bce1e5d3deeaa7c5566760 requires the exact governed 37 Customer Master keys × ko/en/ja/zh/vi/es/de/fr = 296 nonblank values, placeholder parity for parameterized copy, no non-English value equal to the English/source key, idempotent seed replay, database publishability, and rollback that removes an unpublished draft but refuses an immutable published resource.

    Causal product repair 0426a70a627fe01665235722d5bf4d926cde9b74 adds migrations/0248_customer_master_translation_draft.sql plus rollback. It intentionally leaves lineageweave/customer-master/v1 in draft: the localized copy has not received qualifying independent language/product review, so this run does not turn it into immutable publication authority.

    Current parent head 64fa200e46854878b3154880af678afa69284fdb adds a test-causality correction only. The rollback-refusal migration deliberately opens a transaction and raises on published resources, so the expected exception leaves that transaction aborted; the test now issues ROLLBACK before asserting the previously committed published resource is durable. Current parent Tests/PROV-O/Ontology Pages are Draft-skipped and SAST/Security/CodeQL are queued, so no current-head GREEN is claimed.

    Consumer #932 was immediately converged ordinary/non-force to 8133220817a875da72f4bbc5dd011f30f060a126; its publication review thread remains open. The remaining #922 acceptance gap is independent review -> hosted PostgreSQL GREEN -> explicit publication -> authenticated API/browser eight-locale state/a11y/font/text-expansion evidence, rather than absence of a concrete 8-locale resource. Product-wide locale admission remains separate and no English fallback was promoted.

  10. seonghobae commented on Sep 17, 2026

    @seonghobae
    ContributorAuthor

    2026-09-17 current evidence update: #929 moved to exact d4f42f579663e88a0c9af0cc492aa6ff7cae96ee, with direct consumer #932 non-force/two-parent converged to fb2422537216a19280860f710b55f4df963902db.

    Fresh semantic-upgrade RED 8b395738d2815ee002c85b27648841a06aa5e45f shows the prior same-name constraint upgrade still relied on token presence: a canonical shape CHECK could mention retired while requiring the wrong resource_id IS NOT NULL shape and therefore block ordinary owned-root retirement. Repair 667aca9b233f269d868fb99f8740aa66002b09ce versions the two repository-owned canonical ownership constraints with catalog comments; unversioned same-named predecessors are replaced once, while differently named operator/DBA checks remain untouched. Exact head d4f42f57... adds marker assertions plus OID-stable replay evidence so subsequent migration replay does not repeatedly rebuild/validate the constraints.

    This narrows the DB-ledger migration/replay gap but does not satisfy #922 GREEN acceptance. #929 Tests 35236145547 remains pre-runner (Full suite 105252445377, Frontend 105252445197, both queued with runner_id=0, steps=[]), the ownership/replay review thread is unresolved, and the 37×8 candidate remains unpublished pending independent language/product review and authenticated eight-locale browser/a11y/CJK/text-expansion evidence. #932 Tests 35236229290 is Draft-policy skipped and is not GREEN.

  11. added
    documentationImprovements or additions to documentation
    and removed
    documentationImprovements or additions to documentation
    enhancementNew feature or request
    on Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions