diff --git a/.planning/STATE.md b/.planning/STATE.md index 288a92e..7f0edef 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -607,20 +607,20 @@ Recent decisions affecting current work: ### Pending Todos - [2026-10-01] [docs] Benchmark Płytarium on WinterCMS vs SummerCMS and publish a measured table — [todo file](.planning/todos/pending/2026-10-01-benchmark-the-application-on-wintercms-vs-summercms.md) +- [2026-10-07] [sm-translate-plugin] Translate Messages as a Nuxt i18n JSON editor — [todo file](.planning/todos/pending/2026-10-07-translate-messages-as-nuxt-i18n-json-editor.md) - [unknown] [summercms.go admin auth] Backend admin personal API tokens (deferred Apparatus PersonalApiToken) — [todo file](.planning/todos/pending/backend-admin-api-tokens.md) - [unknown] [summercms.go bonfire] Reject duplicate console command names in bonfire.NewRoot — [todo file](.planning/todos/pending/bonfire-duplicate-command-names.md) -- [unknown] [summercms.go/fetchguard] Extend fetchguard into a guarded outbound http.Client (replaces Apparatus RequestSender) — [todo file](.planning/todos/pending/fetchguard-guarded-http-client.md) - [unknown] [summercms.go lagoon] lagoon README registers an after-commit GORM callback that can sort after the flush — [todo file](.planning/todos/pending/lagoon-readme-after-commit-callback-order.md) -- [unknown] [summercms.go lagoon] lagoon.Validate reports every numeric range failure with the max message — [todo file](.planning/todos/pending/lagoon-validate-min-message.md) +- [unknown] [sm-user-plugin mail] Port MailBlocker and the block-mail checkbox with the mailing work — [todo file](.planning/todos/pending/mailblocker-with-mailing.md) - [unknown] [summercms.go] Nest framework packages under modules/ — same beach names — [todo file](.planning/todos/pending/nest-framework-packages-under-modules.md) - [unknown] [summercms.go/modules] Short README.md per modules/* after the nest — [todo file](.planning/todos/pending/per-module-readmes-after-nest.md) - [unknown] [summercms.go/modules/*/README.md, internal/docsite] Convert module README Go code blocks to compiled src= references — [todo file](.planning/todos/pending/readme-go-fences-src.md) -- [unknown] [summercms.go logging] Framework slog handler that redacts credentials (port RedactCredentialsTap) — [todo file](.planning/todos/pending/redacting-slog-handler.md) - [unknown] [../fonoteka.go/README.md] Refresh fonoteka.go README — short status plus migrate/serve/login — [todo file](.planning/todos/pending/refresh-fonoteka-readme.md) - [unknown] [summercms.go/README.md] Rewrite summercms.go README — onboard, recreate login, honest cutover — [todo file](.planning/todos/pending/rewrite-summercms-readme.md) - [unknown] [summercms.go internal/build] make:admin-controller output does not boot and names the model after the controller — [todo file](.planning/todos/pending/scaffold-admin-controller-incomplete.md) - [unknown] [summercms.go internal/build] Scaffolded files carry a DO NOT EDIT header, and make:command cannot reach the application — [todo file](.planning/todos/pending/scaffold-generated-header-and-command-deps.md) - [unknown] [summercms.go internal/build] make:model and make:migration in the same second produce migrations that run out of order — [todo file](.planning/todos/pending/scaffold-same-second-migration-order.md) +- [unknown] [sm-sitemap-plugin] Port the sitemap plugin 1:1 as sm-sitemap-plugin for the next blog project — [todo file](.planning/todos/pending/sitemap-plugin-port.md) - [unknown] [summercms.go wristband] Neutral default resource URL in wristband.DefaultOptions — [todo file](.planning/todos/pending/wristband-neutral-resource-default.md) ### Blockers/Concerns diff --git a/.planning/todos/pending/2026-10-07-translate-messages-as-nuxt-i18n-json-editor.md b/.planning/todos/pending/2026-10-07-translate-messages-as-nuxt-i18n-json-editor.md new file mode 100644 index 0000000..606fd46 --- /dev/null +++ b/.planning/todos/pending/2026-10-07-translate-messages-as-nuxt-i18n-json-editor.md @@ -0,0 +1,31 @@ +--- +created: 2026-10-07T16:31:50.525Z +title: Translate Messages as a Nuxt i18n JSON editor +area: sm-translate-plugin +severity: minor +files: + - ../sm-translate-plugin/admin_settings.go + - modules/pact/capabilities.go (SettingsItem.Controller) + - ../examples/golem15-wintercms-starter/plugins/golem15/translate/Plugin.php (registerSettings: messages) +--- + +## Problem + +WinterCMS translate registers two settings entries: Locales and Messages. Messages +manages CMS theme Twig strings such as `{{ 'x.y.z'|_ }}`, stored in a messages table. +SummerCMS apps are headless and have no server-rendered theme strings, so the Go port +(quick 261007-p4y) registers only Locales. The frontend strings live in the Nuxt app's +i18n locale JSON files, which admins currently cannot edit. + +## Solution + +Integrate Nuxt i18n with the translate plugin as an i18n JSON editor, not a +WinterCMS-style messages table: +- admin screen edits per-locale message keys (nested JSON, one column per enabled + Locale), with missing-key highlighting against the default locale; +- the backend serves the merged messages to the Nuxt app (e.g. a lazy-load endpoint + per locale that @nuxtjs/i18n can fetch), with the bundled JSON as fallback; +- register as a second controller-link settings entry (`pact.SettingsItem.Controller`) + under the Translate category, next to Locales. +Open questions: storage (DB rows vs. versioned JSON), how keys are discovered/synced +from the Nuxt repo, caching and invalidation on edit.