feat(cms): import AI-draft English content from a translation memory (MITHOME-113)

src/content/translations/en.json is a reviewable hu -> en memory built
from the live staging content (179 texts). Tests guard every entry:
placeholders, HTML, legal markup and e-mail/URL literals must survive.

fillEnglishDraft() fills only empty English values whose Hungarian text
exactly matches a memory key (lists all-or-nothing) and moves the page
status none -> ai-draft; it never sets "approved" or overwrites English.
The 20260929_en_ai_draft migration applies it to every global and legal
page (published doc + latest version), reports untranslated texts, and
wraps legacy values first so it does not depend on migration order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Do Siki
2026-09-29 11:05:16 +02:00
co-authored by Claude Opus 5.5
parent 32b6643fbc
commit 822646a82a
9 changed files with 521 additions and 5 deletions
+7
View File
@@ -1,6 +1,7 @@
import * as migration_20260929_localize_globals from './20260929_localize_globals'
import * as migration_20260929_cta_page_links from './20260929_cta_page_links'
import * as migration_20260929_localize_legal_pages from './20260929_localize_legal_pages'
import * as migration_20260929_en_ai_draft from './20260929_en_ai_draft'
/**
* Payload migrations, in order. Passed to `mongooseAdapter({ prodMigrations })`
@@ -24,4 +25,10 @@ export const migrations = [
down: migration_20260929_localize_legal_pages.down,
name: '20260929_localize_legal_pages',
},
{
// MITHOME-113 — needs both locale migrations above ({ hu } shapes).
up: migration_20260929_en_ai_draft.up,
down: migration_20260929_en_ai_draft.down,
name: '20260929_en_ai_draft',
},
]