Write the site in US English

color, center, canceled, labeled, recognize and the rest, in UI
text, help text, comments, docs and names (ColorInput, QrCenter).
Migration 053 renames the two Site settings color CHECKs, whose
names are the messages the admin shows. Kept: events.status's
stored value 'cancelled' (shown as canceled), aria-labelledby,
schema.org's EventCancelled, and old migrations as they ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-30 13:23:56 -05:00
parent 38aff34c97
commit 2ad65cdc15
60 changed files with 182 additions and 148 deletions

View file

@ -170,7 +170,7 @@ function RecipientRow({ recipient, accent }: { recipient: Recipient; accent: str
/* awarded_on may be a partial date, so this takes the leading year
rather than parsing. A full date would be false precision on a
row backfilled from a programme booklet. */
row backfilled from a program booklet. */
function year(date?: string | null): string | null {
if (!date) return null
const match = /^(\d{4})/.exec(date)

View file

@ -64,7 +64,7 @@ const ROLE_LABEL: Record<string, string> = {
const STATUS_LABEL: Record<string, string> = {
upcoming: 'Upcoming',
past: 'Past',
cancelled: 'Cancelled',
cancelled: 'Canceled',
}
export default function EventDetail() {
@ -131,7 +131,7 @@ export default function EventDetail() {
},
]
// A cancelled series has no next meeting, whatever its dates say.
// A canceled series has no next meeting, whatever its dates say.
const upcoming =
event.status === 'cancelled'
? []

View file

@ -20,7 +20,7 @@ const SECTIONS = [
id: 'make',
title: 'Make a QR code',
blurb:
'Pick a page from the main navigation, any event, organization, team, award, person or blog post, or type any link. Site pages always point at the live site. Choose what sits in the centre and the colours; a warning shows if the code might not scan.',
'Pick a page from the main navigation, any event, organization, team, award, person or blog post, or type any link. Site pages always point at the live site. Choose what sits in the center and the colors; a warning shows if the code might not scan.',
accent: BRAND,
background: 'var(--color-tint)',
content: (

View file

@ -159,7 +159,7 @@ function RequestFiles({ row, canWrite, canRemove }) {
);
}
/* A content request's details (049), labelled from requestTypes.ts;
/* A content request's details (049), labeled from requestTypes.ts;
keys it no longer knows are shown as they are. */
function RequestDetails({ row }) {
const entries = Object.entries(row.details ?? {});

View file

@ -181,7 +181,7 @@ export default function AdminLayout() {
</div>
{/* Subnav. Only drawn where there is something to draw, so
Events and People don't get an empty grey strip. */}
Events and People don't get an empty gray strip. */}
{subnav.length > 0 && (
<div className="border-t border-brand/10 bg-tint-soft">
<div className="mx-auto flex max-w-5xl flex-wrap gap-6 px-6 py-2.5 text-sm">

View file

@ -22,7 +22,7 @@ import { ApiError, get } from "../../lib/api.ts";
/* What a ?error= from the Google callback means, in the words the
person at the login page needs. */
const GOOGLE_ERRORS: Record<string, string> = {
cancelled: "Google sign-in was cancelled.",
canceled: "Google sign-in was canceled.",
expired: "That sign-in took too long or was already used. Try again.",
no_account:
"There's no admin account for that Google account. Ask a superadmin to add your email.",

View file

@ -131,7 +131,7 @@ export default function EntityEdit() {
return `${slugify(parts.join(" "))}-`;
};
// What to show greyed out before then: org_id becomes "org-".
// What to show grayed out before then: org_id becomes "org-".
const prefixHint = qualifierPaths.length
? `${qualifierPaths.map((path) => path.replace(/_id$/, "")).join("-")}-`
: "";

View file

@ -151,7 +151,7 @@ export const TOOLS_NAV = {
{
to: "/qr",
label: "QR code generator",
blurb: "Codes for flyers, slides and signs: any page or link, in your choice of colours.",
blurb: "Codes for flyers, slides and signs: any page or link, in your choice of colors.",
},
],
};

View file

@ -576,7 +576,7 @@ function MonthGrid({ weeks, month, today, occurrences, selected, onSelect, accen
function Bar({ seg, accent }: { seg: Segment; accent: string }) {
const color = seg.event.color || accent
const cancelled = seg.event.status === 'cancelled'
const canceled = seg.event.status === 'cancelled'
return (
<Link
@ -585,7 +585,7 @@ function Bar({ seg, accent }: { seg: Segment; accent: string }) {
className={`pointer-events-auto flex items-center gap-1 truncate px-2 text-xs font-semibold text-white transition-[filter] hover:brightness-110 ${
seg.continuesBefore ? 'ml-0 rounded-l-none' : 'ml-1 rounded-l-md'
} ${seg.continuesAfter ? 'mr-0 rounded-r-none' : 'mr-1 rounded-r-md'} ${
cancelled ? 'line-through opacity-60' : ''
canceled ? 'line-through opacity-60' : ''
}`}
style={{
gridColumn: `${seg.col + 1} / span ${seg.span}`,
@ -711,7 +711,7 @@ function EventLine({ item, accent }: { item: Occurrence; accent: string }) {
const { event } = item
const color = event.color || accent
const where = event.location_label || (event.is_online ? 'Online' : null)
const cancelled = event.status === 'cancelled'
const canceled = event.status === 'cancelled'
return (
<Link
@ -720,9 +720,9 @@ function EventLine({ item, accent }: { item: Occurrence; accent: string }) {
>
<span className="mt-1.5 h-3 w-3 shrink-0 rounded-full" style={{ background: color }} aria-hidden="true" />
<span className="min-w-0">
<span className={`block font-semibold group-hover:underline ${cancelled ? 'line-through' : ''}`}>
<span className={`block font-semibold group-hover:underline ${canceled ? 'line-through' : ''}`}>
{event.title}
{cancelled && <span className="ml-2 text-xs font-bold uppercase text-danger no-underline">Cancelled</span>}
{canceled && <span className="ml-2 text-xs font-bold uppercase text-danger no-underline">Canceled</span>}
</span>
<span className="block text-sm" style={{ color: BODY }}>
{[

View file

@ -36,7 +36,7 @@ import { accentText, withAlpha, readableOn, BRAND } from '../../lib/color.ts'
fires only for an event with no host at all. */
const DEFAULT_ORG_LOGO = null;
const INK = "var(--color-ink)"; // button text: the card colour is only a border
const INK = "var(--color-ink)"; // button text: the card color is only a border
const CARD_BG = "var(--color-surface)"; // sits under every card, photo or not
/* Laid over a card's background image so black text reads on any
@ -186,7 +186,7 @@ export function Card({
filter: past ? "saturate(0.75)" : "none",
pointerEvents: interactive ? "auto" : "none",
}}
// A card shown but not in play (a carousel neighbour, a collapsed
// A card shown but not in play (a carousel neighbor, a collapsed
// past event) keeps its links out of the tab order too.
inert={!interactive}
>
@ -277,7 +277,7 @@ export function Card({
compact ? "gap-2" : "gap-3"
} ${links.length === 0 ? "mt-4" : ""}`}
>
{/* Button text takes the card's colour (the event's own,
{/* Button text takes the card's color (the event's own,
or the band's default, teal unless the page sets one),
the same as the border, rather than the card's black. */}
{links.map(item => (
@ -464,7 +464,7 @@ export default function EventListCards({
);
/* Open on the first upcoming event. The list is empty on the
first render, so this can't be a useState initialiser, it has
first render, so this can't be a useState initializer, it has
to wait for the data and then run once. Clearing the guard when
the list empties means a refetch re-seeds. */
const seeded = useRef(false);

View file

@ -17,7 +17,7 @@ import { scrollBehavior } from "../../lib/motion.ts";
Filtered to groups, and unlike the other sections that isn't
a prop. A map only makes sense for organizations that sit
somewhere, and it reads regions off the same data to colour the
somewhere, and it reads regions off the same data to color the
tiles, so "plot partners instead" isn't a filter change, it's a
different component. Named for the view rather than the filter
so that stays visible.
@ -49,7 +49,7 @@ const INK = "var(--color-body)";
const FALLBACK_COLOR = "#4a6b72";
/* organizations.color is nullable; an SVG fill left undefined paints
black, so an uncoloured region takes the same fallback as a card. */
black, so an uncolored region takes the same fallback as a card. */
const colorOf = (item) => item.color || FALLBACK_COLOR;
const US_TITLE = "US Unity Regions";

View file

@ -19,7 +19,7 @@ import { accentText } from '../../lib/color.ts'
A stack of organizations, each collapsed to a line and
expandable for the rest. Every row carries two ways out: an
arrow through to that organization's page on this site, and a
labelled button out to its own site when it has one.
labeled button out to its own site when it has one.
Nothing here is region-specific. It asks for a kind and renders
what comes back, so the same section lists partners or groups

View file

@ -8,10 +8,10 @@
Which the page or record itself
Section for a main page with a subnav, optionally one of
its #sections
Centre nothing, the NGU dove, or any SVG in
Center nothing, the NGU dove, or any SVG in
src/assets/qr (drop a file there and it's offered;
it's embedded in the code, so downloads carry it)
Colours the code, its background, and the dove. A warning
Colors the code, its background, and the dove. A warning
appears when the pair is unlikely to scan: too
little contrast, or a light code on a dark ground
@ -27,13 +27,13 @@
Codes point at SITE_ORIGIN, never at wherever this page is open,
so one made on localhost still works on a poster.
Downloads are the on-screen <svg> itself: serialised for the SVG,
Downloads are the on-screen <svg> itself: serialized for the SVG,
drawn onto a canvas for the PNG. Neither needs a server.
═══════════════════════════════════════════════════════════════ */
import { useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
import QrCode, { QR_DOVE, QR_INK, QR_PAPER, type QrCentre } from '../../components/QrCode.tsx'
import QrCode, { QR_DOVE, QR_INK, QR_PAPER, type QrCenter } from '../../components/QrCode.tsx'
import { NAV_ACTIONS, PAGE_LINKS, PAGE_SECTIONS } from '../../navConfig.ts'
import { awardHref, blogHref, eventHref, orgHref, personHref, teamHref } from '../../lib/hrefs.ts'
import { siteUrl } from '../../lib/site.ts'
@ -59,31 +59,31 @@ const KINDS: Array<[Kind, string]> = [
['custom', 'A link I type'],
]
/* The centres on offer: the dove, then every SVG in src/assets/qr,
/* The centers on offer: the dove, then every SVG in src/assets/qr,
named after its file ("ngu-circle.svg" → "Ngu circle"). Read as
text and turned into data: URLs so they sit inside the code's own
SVG. */
const CENTRE_FILES = import.meta.glob<string>('../../assets/qr/*.svg', {
const CENTER_FILES = import.meta.glob<string>('../../assets/qr/*.svg', {
eager: true,
query: '?raw',
import: 'default',
})
type CentreOption = { id: string; label: string; centre: (dove: string) => QrCentre }
type CenterOption = { id: string; label: string; center: (dove: string) => QrCenter }
const toDataUrl = (svg: string) =>
`data:image/svg+xml;base64,${btoa(String.fromCharCode(...new TextEncoder().encode(svg)))}`
const CENTRES: CentreOption[] = [
{ id: 'none', label: 'Nothing', centre: () => null },
{ id: 'dove', label: 'NGU dove', centre: (color) => ({ kind: 'dove', color }) },
...Object.entries(CENTRE_FILES)
const CENTERS: CenterOption[] = [
{ id: 'none', label: 'Nothing', center: () => null },
{ id: 'dove', label: 'NGU dove', center: (color) => ({ kind: 'dove', color }) },
...Object.entries(CENTER_FILES)
.sort(([a], [b]) => a.localeCompare(b))
.map(([path, svg]) => {
const name = path.split('/').pop()!.replace(/\.svg$/i, '')
const label = name.replace(/[-_]+/g, ' ').replace(/^./, (c) => c.toUpperCase())
const src = toDataUrl(svg)
return { id: `file:${name}`, label, centre: () => ({ kind: 'image', src }) as QrCentre }
return { id: `file:${name}`, label, center: () => ({ kind: 'image', src }) as QrCenter }
}),
]
@ -258,7 +258,7 @@ export default function QrCodeMaker() {
const [path, setPath] = useState('/')
const [section, setSection] = useState('')
const [custom, setCustom] = useState('')
const [centreId, setCentreId] = useState('dove')
const [centerId, setCenterId] = useState('dove')
const [ink, setInk] = useState(QR_INK)
const [paper, setPaper] = useState(QR_PAPER)
const [doveColor, setDoveColor] = useState(QR_DOVE)
@ -283,8 +283,8 @@ export default function QrCodeMaker() {
const target = kind === 'custom' ? typed : selected ? `${selected.path}${section}` : null
const url = kind === 'custom' ? typed : target ? siteUrl(target) : null
const centreOption = CENTRES.find((c) => c.id === centreId) ?? CENTRES[0]
const centre = centreOption.centre(doveColor)
const centerOption = CENTERS.find((c) => c.id === centerId) ?? CENTERS[0]
const center = centerOption.center(doveColor)
const warning = scanWarning(ink, paper)
useEffect(() => setCopied(false), [url])
@ -381,8 +381,8 @@ export default function QrCodeMaker() {
</Select>
)}
<Select id="qr-centre" label="In the centre" value={centreId} onChange={setCentreId}>
{CENTRES.map((c) => (
<Select id="qr-center" label="In the center" value={centerId} onChange={setCenterId}>
{CENTERS.map((c) => (
<option key={c.id} value={c.id}>
{c.label}
</option>
@ -390,12 +390,12 @@ export default function QrCodeMaker() {
</Select>
<fieldset>
<legend className="text-sm font-medium text-body">Colours</legend>
<legend className="text-sm font-medium text-body">Colors</legend>
<div className="mt-2 flex flex-wrap items-end gap-5">
<ColourInput id="qr-ink" label="Code" value={ink} onChange={setInk} />
<ColourInput id="qr-paper" label="Background" value={paper} onChange={setPaper} />
{centreOption.id === 'dove' && (
<ColourInput id="qr-dove" label="Dove" value={doveColor} onChange={setDoveColor} />
<ColorInput id="qr-ink" label="Code" value={ink} onChange={setInk} />
<ColorInput id="qr-paper" label="Background" value={paper} onChange={setPaper} />
{centerOption.id === 'dove' && (
<ColorInput id="qr-dove" label="Dove" value={doveColor} onChange={setDoveColor} />
)}
{(ink !== QR_INK || paper !== QR_PAPER || doveColor !== QR_DOVE) && (
<button
@ -408,7 +408,7 @@ export default function QrCodeMaker() {
className="pb-2 text-sm underline"
style={{ color: accentText(BRAND) }}
>
Reset colours
Reset colors
</button>
)}
</div>
@ -446,7 +446,7 @@ export default function QrCodeMaker() {
<QrCode
ref={svgRef}
value={url}
centre={centre}
center={center}
ink={ink}
paper={paper}
label={`QR code for ${url}`}
@ -490,8 +490,8 @@ const inputClass =
'w-full rounded-xl border border-muted/50 bg-surface px-4 py-3 text-body ' +
'outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25'
/* A colour well with its hex beside it, both editable. */
function ColourInput({
/* A color well with its hex beside it, both editable. */
function ColorInput({
id,
label,
value,
@ -519,7 +519,7 @@ function ColourInput({
/>
<input
type="text"
aria-label={`${label} colour, as hex`}
aria-label={`${label} color, as hex`}
value={text}
onChange={(e) => {
setText(e.target.value)

View file

@ -6,8 +6,8 @@
Backdrop, what fills the background:
brand drifting colour and slow concentric rings (many
circles, one centre) with the dove at that centre
brand drifting color and slow concentric rings (many
circles, one center) with the dove at that center
photos the hero photos, crossfading with a slow zoom, a
progress bar per photo and a pause button (anything
that moves on its own for more than five seconds
@ -222,7 +222,7 @@ function BrandBackdrop() {
</radialGradient>
</defs>
{/* The rings are faint; the dove at their centre is not, so
{/* The rings are faint; the dove at their center is not, so
the opacity sits on the rings rather than the whole SVG. */}
<g opacity="0.16">
<g className="hp-rings" fill="none" stroke="#ffffff">
@ -239,7 +239,7 @@ function BrandBackdrop() {
</g>
{/* Outside the rotating groups, so it stays upright while the
rings turn around it. 64 × 42.7 at the centre fits inside
rings turn around it. 64 × 42.7 at the center fits inside
the innermost ring (r 40) with room to float. */}
<circle cx="200" cy="200" r="46" fill="url(#hp-dove-glow)" />
<g className="hp-dove" style={{ color: '#ffffff' }} opacity="0.9">
@ -451,7 +451,7 @@ function VideoFrame({
/* ── Featured event ──────────────────────────────────────────── */
/* The event's own card for the hero: its background photo (or its
colour), then what, when and where, then its buttons and a way
color), then what, when and where, then its buttons and a way
to its page. The first action link is the filled button, since
it's usually Register. */
function EventPanel({ event }: { event: HeroEvent }) {

View file

@ -29,7 +29,7 @@ type PathfinderProps = {
paths: FrontPagePath[]
}
/* One accent per position, cycling. Paths are data; colour is
/* One accent per position, cycling. Paths are data; color is
presentation, so it's assigned here rather than stored. */
/* A path's icon: a key from src/data/pathIcons.ts, drawn from
Phosphor. A path saved before the list existed may hold an emoji;

View file

@ -33,7 +33,7 @@
to { transform: translate(-10%, -15%) scale(1.2); }
}
/* Concentric rings: many circles, one centre. */
/* Concentric rings: many circles, one center. */
.hp-rings {
animation: hp-spin 90s linear infinite;
transform-origin: 50% 50%;
@ -44,7 +44,7 @@
to { transform: rotate(360deg); }
}
/* The dove at the rings' centre bobs gently rather than turning. */
/* The dove at the rings' center bobs gently rather than turning. */
.hp-dove {
animation: hp-bob 6s ease-in-out infinite;
transform-box: fill-box;