Admin wording follow-ups from the browser check

- stats nav link reads "Statistics overview" (it renders after all nav groups)
- form-builder e-mails array labelled in en + pl
- dev import map: RowLabel (cookie banner rows)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-27 15:49:37 +01:00
co-authored by Claude Opus 5.5
parent 0a2374db18
commit a92bc51814
5 changed files with 12 additions and 5 deletions
+2
View File
@@ -31,6 +31,7 @@ import { CookieScanButton as CookieScanButton_7568fe47d582ff15ce85d2e1873c2c23 }
import { IntegrationStatusBanner as IntegrationStatusBanner_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
import { MaskedField as MaskedField_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
import { TestEmailButton as TestEmailButton_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
import { RowLabel as RowLabel_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
import { StatsNavLink as StatsNavLink_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
import { CookieCrawlAlert as CookieCrawlAlert_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
import { StatsWidget as StatsWidget_7568fe47d582ff15ce85d2e1873c2c23 } from '@intecion/ipal-kit/admin'
@@ -73,6 +74,7 @@ export const importMap = {
"@intecion/ipal-kit/admin#IntegrationStatusBanner": IntegrationStatusBanner_7568fe47d582ff15ce85d2e1873c2c23,
"@intecion/ipal-kit/admin#MaskedField": MaskedField_7568fe47d582ff15ce85d2e1873c2c23,
"@intecion/ipal-kit/admin#TestEmailButton": TestEmailButton_7568fe47d582ff15ce85d2e1873c2c23,
"@intecion/ipal-kit/admin#RowLabel": RowLabel_7568fe47d582ff15ce85d2e1873c2c23,
"@intecion/ipal-kit/admin#StatsNavLink": StatsNavLink_7568fe47d582ff15ce85d2e1873c2c23,
"@intecion/ipal-kit/admin#CookieCrawlAlert": CookieCrawlAlert_7568fe47d582ff15ce85d2e1873c2c23,
"@intecion/ipal-kit/admin#StatsWidget": StatsWidget_7568fe47d582ff15ce85d2e1873c2c23,
+1 -1
View File
@@ -52,7 +52,7 @@ Adds:
blocked — written only by the endpoint with `overrideAccess`),
- `POST /api/ipal/hit`,
- the **`<adminRoute>/stats`** view (default `/admin/stats`; it uses `ipalKit({ adminRoute })`, not
`routes.admin` set by hand in the config) + a nav link (`StatsNavLink`),
`routes.admin` set by hand in the config) + a nav link *Statistics overview* (`StatsNavLink`, hidden for users who cannot read `stats-visits`),
- a 30-day chart on the dashboard (`StatsWidget`),
- `STATS_SLUG` (`'stats-visits'`) from `@intecion/ipal-kit` — for your own queries.
+2 -2
View File
@@ -26,7 +26,7 @@ export const contentTexts = defineTexts({
statsDirect: '(direct)',
statsFrom: 'from {{referrer}}',
statsIntro: 'Last 30 days, counted without cookies and without storing IP addresses.',
statsNavLink: 'Overview',
statsNavLink: 'Statistics overview',
statsNoAccess: 'You do not have access to statistics.',
statsNoData: 'No data yet. It appears after the first visits.',
statsNoVisitors: 'No visitor has accepted analytics cookies yet.',
@@ -83,7 +83,7 @@ export const contentTexts = defineTexts({
statsDirect: '(bezpośrednio)',
statsFrom: 'z {{referrer}}',
statsIntro: 'Ostatnie 30 dni, liczone bez cookies i bez zapisywania adresów IP.',
statsNavLink: 'Przegląd',
statsNavLink: 'Podsumowanie statystyk',
statsNoAccess: 'Brak dostępu do statystyk.',
statsNoData: 'Brak danych. Pojawią się po pierwszych wizytach.',
statsNoVisitors: 'Żaden odwiedzający nie zaakceptował jeszcze cookies analitycznych.',
+6 -1
View File
@@ -102,7 +102,12 @@ function localizeFormBuilder<T>(node: T): T {
if ('label' in f) {out.label = formBuilderText(f.label)}
// The text block's rich text has no label of its own.
if (f.type === 'richText' && f.name === 'message' && !f.label) {out.label = { en: 'Text', pl: 'Treść' }}
if (f.labels && typeof f.labels === 'object') {
// The e-mails array has no label (auto "Emails").
if (f.type === 'array' && f.name === 'emails' && !f.label) {
out.label = { en: 'E-mails', pl: 'E-maile' }
out.labels = { plural: { en: 'E-mails', pl: 'E-maile' }, singular: { en: 'E-mail', pl: 'E-mail' } }
}
if (f.labels && typeof f.labels === 'object' && f.name !== 'emails') {
const labels = f.labels as Record<string, unknown>
out.labels = { ...labels, plural: formBuilderText(labels.plural), singular: formBuilderText(labels.singular) }
}
+1 -1
View File
@@ -15,7 +15,7 @@ type Props = {
/**
* Nav link to /admin/stats (admin.components.afterNavLinks), shown right after
* the Statistics group, so it reads "Overview". Hidden for users the
* the Statistics group (it renders after all nav groups), so it reads "Statistics overview". Hidden for users the
* stats-visits collection does not let read.
*/
export async function StatsNavLink({ adminRoute = '/admin', i18n, payload, user }: Props) {