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
+9 -6
View File
@@ -1,5 +1,8 @@
import type { Payload } from 'payload'
import { ipalT } from '../admin-i18n/t.js'
import { settingsTexts } from '../admin-i18n/texts/settings.js'
/**
* White-label admin branding: the Payload admin panel's logo (login + nav) and
* icon, pulled from the project's SiteSettings so each client sees THEIR brand,
@@ -118,6 +121,8 @@ export async function AdminIcon(props: BrandingProps = {}) {
* data — a sensible default here is fine and A0-safe. The client's own brand
* still owns the logo/name; this is a small line stating who supports the tech.
* Text/URL overridable; turn it off with `whiteLabel: { credit: false }`.
* The default text follows the admin language (`ipal:brandingCredit`, which a
* project can also override in `i18n.translations`).
*
* Wired by ipalKit into admin.components.afterNavLinks (nav) AND afterLogin
* (login screen footer). `variant` adjusts placement:
@@ -125,13 +130,11 @@ export async function AdminIcon(props: BrandingProps = {}) {
* - 'login' → centered line below the login form
*/
export function IntecionCredit(
props: { text?: string; url?: string; variant?: 'login' | 'nav' } = {},
props: { i18n?: { t: (key: never, vars?: Record<string, unknown>) => string }; text?: string; url?: string; variant?: 'login' | 'nav' } = {},
) {
const {
text = 'Technology supported by Intecion.com',
url = 'https://intecion.com',
variant = 'nav',
} = props
const { i18n, url = 'https://intecion.com', variant = 'nav' } = props
// A project's own text wins; otherwise the plugin's text in the admin language.
const text = props.text ?? (i18n ? ipalT(i18n.t, 'brandingCredit') : settingsTexts.en.brandingCredit)
const style =
variant === 'login'
? {