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:
co-authored by
Claude Opus 5.5
parent
eeac33ed2f
commit
6b46bc0c14
@@ -67,14 +67,30 @@ export function extractHeadings(data: unknown, options: ExtractHeadingsOptions =
|
||||
*/
|
||||
export function buildTableOfContentsField({ name = 'tableOfContents' }: { name?: string } = {}): GroupField {
|
||||
const fields: Field[] = [
|
||||
{ name: 'show', type: 'checkbox', admin: { description: 'List of the section headings (H2) with links to them — for long documents.' }, label: 'Show table of contents' },
|
||||
{
|
||||
name: 'show',
|
||||
type: 'checkbox',
|
||||
admin: {
|
||||
description: {
|
||||
en: 'Lists the section headings with links to them, for long pages.',
|
||||
pl: 'Lista nagłówków sekcji z linkami do nich, przydatna na długich stronach.',
|
||||
},
|
||||
},
|
||||
label: { en: 'Show table of contents', pl: 'Pokaż spis treści' },
|
||||
},
|
||||
{
|
||||
name: 'label',
|
||||
type: 'text',
|
||||
admin: { condition: (_: unknown, s: { show?: boolean } | undefined) => Boolean(s?.show), description: 'Heading above the list, e.g. "Contents". Empty → none.' },
|
||||
label: 'Label',
|
||||
admin: {
|
||||
condition: (_: unknown, s: { show?: boolean } | undefined) => Boolean(s?.show),
|
||||
description: {
|
||||
en: 'Heading above the list, e.g. "Contents"; leave empty for none.',
|
||||
pl: 'Nagłówek nad listą, np. „Spis treści”; zostaw puste, aby go pominąć.',
|
||||
},
|
||||
},
|
||||
label: { en: 'List heading', pl: 'Nagłówek listy' },
|
||||
localized: true,
|
||||
},
|
||||
]
|
||||
return { name, type: 'group', fields, interfaceName: 'TableOfContentsSettings', label: 'Table of contents' }
|
||||
return { name, type: 'group', fields, interfaceName: 'TableOfContentsSettings', label: { en: 'Table of contents', pl: 'Spis treści' } }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user