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
+7 -7
View File
@@ -32,7 +32,7 @@ afterEach(() => {
vi.unstubAllEnvs()
})
describe('search verification (Site Settings → Search & AI)', () => {
describe('search verification (Site settings → Search engines)', () => {
test('keeps the code from a bare value or a pasted <meta> tag', () => {
expect(normalizeVerificationToken(' abc-123_XYZ ')).toBe('abc-123_XYZ')
expect(normalizeVerificationToken('<meta name="google-site-verification" content="Tok_9-x" />')).toBe('Tok_9-x')
@@ -289,24 +289,24 @@ describe('collectSiteIndex and llms.txt', () => {
})
})
describe('plugin: Search & AI tab', () => {
describe('plugin: Search engines tab', () => {
const base = (): Config => ({ collections: [{ slug: 'users', auth: true, fields: [] }], secret: 'test' }) as unknown as Config
const tabs = (c: Config) => {
const settings = c.globals?.find((g) => g.slug === 'site-settings')
const field = settings?.fields[0] as { tabs: { label: string }[] }
return field.tabs.map((t) => t.label)
const field = settings?.fields[0] as { tabs: { label: { en: string } }[] }
return field.tabs.map((t) => t.label.en)
}
test('on by default, off with seo.searchSettings: false', async () => {
const on = await ipalKit({ access: { authCollection: 'users' }, i18n: config, twoFactor: false })(base())
expect(tabs(on)).toContain('Search & AI')
expect(tabs(on)).toContain('Search engines')
const off = await ipalKit({
access: { authCollection: 'users' },
i18n: config,
seo: { collections: [], searchSettings: false },
twoFactor: false,
})(base())
expect(tabs(off)).not.toContain('Search & AI')
expect(tabs(off)).not.toContain('Search engines')
const custom = await ipalKit({
access: { authCollection: 'users' },
i18n: config,
@@ -314,7 +314,7 @@ describe('plugin: Search & AI tab', () => {
twoFactor: false,
})(base())
const settings = custom.globals?.find((g) => g.slug === 'site-settings')
const tab = (settings?.fields[0] as { tabs: { fields: { name?: string }[]; label: string }[] }).tabs.find((t) => t.label === 'Search & AI')
const tab = (settings?.fields[0] as { tabs: { fields: { name?: string }[]; label: { en: string } }[] }).tabs.find((t) => t.label.en === 'Search engines')
expect(tab?.fields.map((f) => f.name)).toEqual(['searchVerification', 'aiCrawlers'])
})
})