Admin panel in English and Polish, reworded per docs/dev/admin-ux.md

- admin-i18n module: AdminText { en, pl }, component texts under the ipal
  namespace (project translations win), en + pl admin languages when the
  project sets none (project's supportedLanguages wins)
- every plugin label, description, option, tab and group as { en, pl };
  explicit labels instead of auto-labels; sentence case; glossary terms
- visible renames (slugs, names, data unchanged): Cookie banner, Form
  messages, Privacy group, Search engines, Maintenance, Spam protection,
  E-mail sending, stats nav link Overview (hidden without access)
- Polish visitor defaults by page locale: cookie banner, form messages,
  validators, lightbox, accessibility widget; {field} uses the label
- fixes: e-mail status banner used Turnstile wording; developer words and
  env var names out of editor messages; stats numbers/dates in the admin
  language; test e-mail no longer says ipal-kit
- test/adminUx.test.ts: length limits, en + pl present, no developer words

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-27 15:46:25 +01:00
co-authored by Claude Opus 5.5
parent eeac33ed2f
commit 6b46bc0c14
108 changed files with 2806 additions and 981 deletions
+11 -6
View File
@@ -1,5 +1,7 @@
import type { Field, FieldHook, TextareaField } from 'payload'
import type { AdminText } from '../admin-i18n/define.js'
import { blocksToMarkdown } from '../content/blocksToMarkdown.js'
import { mdToPlain, truncate } from './plainText.js'
import { isAutoFillSkipped } from './skipAutoFill.js'
@@ -7,10 +9,10 @@ import { isAutoFillSkipped } from './skipAutoFill.js'
type BuildSummaryFieldArgs = {
/** Auto-fill from page content when the editor leaves it empty. Default true. */
autoFill?: boolean
/** Help text under the field. */
description?: string
/** Sidebar/admin label. */
label?: string
/** Help text under the field: a string or `{ en, pl }`. */
description?: AdminText | string
/** Sidebar label: a string or `{ en, pl }`. Default "AI summary". */
label?: AdminText | string
/** Block layout field to derive the summary from. Default 'layout'. */
layoutField?: string
/** Target length for the auto-generated summary. Default 300. */
@@ -44,8 +46,11 @@ export function buildSummaryField(args: BuildSummaryFieldArgs = {}): Field {
const {
name = 'aiSummary',
autoFill = true,
description = 'Concise page description for AI agents and llms.txt (richer than the meta description). Leave empty to auto-generate from the content.',
label = 'AI summary',
description = {
en: 'Short summary for AI assistants; leave empty to create it from the page content.',
pl: 'Krótkie podsumowanie dla asystentów AI; zostaw puste, aby utworzyć je z treści strony.',
},
label = { en: 'AI summary', pl: 'Podsumowanie dla AI' },
layoutField = 'layout',
maxLength = 300,
overrides = {},