From 183b3046871973e63f55b6e87336f24fde7eb228 Mon Sep 17 00:00:00 2001 From: Do Siki Date: Tue, 29 Sep 2026 01:48:44 +0200 Subject: [PATCH] docs(openspec): archive MITHOME-111 globals localization change Sync the localized page globals and lossless locale migration requirements into the content-management spec. Co-Authored-By: Claude Opus 5.5 --- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/content-management/spec.md | 0 .../tasks.md | 0 openspec/specs/content-management/spec.md | 58 +++++++++++++++++++ 6 files changed, 58 insertions(+) rename openspec/changes/{localize-globals-mithome-111 => archive/2026-09-29-localize-globals-mithome-111}/.openspec.yaml (100%) rename openspec/changes/{localize-globals-mithome-111 => archive/2026-09-29-localize-globals-mithome-111}/design.md (100%) rename openspec/changes/{localize-globals-mithome-111 => archive/2026-09-29-localize-globals-mithome-111}/proposal.md (100%) rename openspec/changes/{localize-globals-mithome-111 => archive/2026-09-29-localize-globals-mithome-111}/specs/content-management/spec.md (100%) rename openspec/changes/{localize-globals-mithome-111 => archive/2026-09-29-localize-globals-mithome-111}/tasks.md (100%) diff --git a/openspec/changes/localize-globals-mithome-111/.openspec.yaml b/openspec/changes/archive/2026-09-29-localize-globals-mithome-111/.openspec.yaml similarity index 100% rename from openspec/changes/localize-globals-mithome-111/.openspec.yaml rename to openspec/changes/archive/2026-09-29-localize-globals-mithome-111/.openspec.yaml diff --git a/openspec/changes/localize-globals-mithome-111/design.md b/openspec/changes/archive/2026-09-29-localize-globals-mithome-111/design.md similarity index 100% rename from openspec/changes/localize-globals-mithome-111/design.md rename to openspec/changes/archive/2026-09-29-localize-globals-mithome-111/design.md diff --git a/openspec/changes/localize-globals-mithome-111/proposal.md b/openspec/changes/archive/2026-09-29-localize-globals-mithome-111/proposal.md similarity index 100% rename from openspec/changes/localize-globals-mithome-111/proposal.md rename to openspec/changes/archive/2026-09-29-localize-globals-mithome-111/proposal.md diff --git a/openspec/changes/localize-globals-mithome-111/specs/content-management/spec.md b/openspec/changes/archive/2026-09-29-localize-globals-mithome-111/specs/content-management/spec.md similarity index 100% rename from openspec/changes/localize-globals-mithome-111/specs/content-management/spec.md rename to openspec/changes/archive/2026-09-29-localize-globals-mithome-111/specs/content-management/spec.md diff --git a/openspec/changes/localize-globals-mithome-111/tasks.md b/openspec/changes/archive/2026-09-29-localize-globals-mithome-111/tasks.md similarity index 100% rename from openspec/changes/localize-globals-mithome-111/tasks.md rename to openspec/changes/archive/2026-09-29-localize-globals-mithome-111/tasks.md diff --git a/openspec/specs/content-management/spec.md b/openspec/specs/content-management/spec.md index bb22bd7..5ec75fc 100644 --- a/openspec/specs/content-management/spec.md +++ b/openspec/specs/content-management/spec.md @@ -76,6 +76,64 @@ does not imply that every current content field has a translation. no English value - **THEN** Payload SHALL fall back to the Hungarian value +### Requirement: Localized page globals + +The Home, About, Services, Contact, and Common globals SHALL store every translatable +text value (titles, subtitles, descriptions, body paragraphs, labels, button texts, +form messages, FAQ entries, metadata, and locale-dependent link targets) separately per +locale. Structural values (icons, row identifiers, the external-link flag, and the +postal address) SHALL be shared across locales. List items that consist of a single +text value (paragraph lists, bullet lists, feature lists, specification item lists) +SHALL be editable per locale, including a different number of items per locale. For +lists of structured rows, the row count, order, and structural values SHALL be shared +across locales, and only the text values within each row SHALL be localized. + +#### Scenario: An administrator saves an English value + +- **WHEN** an administrator edits a translatable global field in the `en` locale and + publishes it +- **THEN** the English public page SHALL render the English value and the Hungarian + public page SHALL continue to render the unchanged Hungarian value + +#### Scenario: An administrator changes a shared structural value + +- **WHEN** an administrator changes a structural value such as an icon in either locale +- **THEN** both locales SHALL render the changed value + +#### Scenario: A paragraph list differs between locales + +- **WHEN** the Hungarian version of a paragraph list has three items and the English + version has two +- **THEN** each locale's public page SHALL render exactly its own items + +### Requirement: Lossless locale migration of existing content + +When a previously non-localized global field becomes localized, its existing value +SHALL be preserved as the Hungarian value, including values edited by administrators +after the initial content import. The migration SHALL cover published content, saved +drafts, and version history, SHALL NOT overwrite existing content with seed data, and +SHALL be safe to run more than once. Deployed environments SHALL apply the migration +without a manual step. + +#### Scenario: Deploy onto a database with administrator edits + +- **WHEN** the localized configuration is deployed onto a database whose globals were + edited in the admin after the initial import +- **THEN** after startup the Hungarian public pages SHALL render the edited values + unchanged, and the English public pages SHALL render the same values through fallback + +#### Scenario: Restore an older version after migration + +- **WHEN** an administrator opens or restores a global version saved before the + migration +- **THEN** the version SHALL show its original text as the Hungarian value rather than + empty fields + +#### Scenario: Migration runs a second time + +- **WHEN** the migration is executed on already migrated data +- **THEN** stored values SHALL remain unchanged + ### Requirement: Public partner media The CMS SHALL allow authenticated administrators to manage partner records and image