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

@ -83,7 +83,7 @@ export const events = {
label: "Type",
options: ["retreat", "class", "workshop", "meeting", "other"],
},
{ key: "status", label: "Status", options: ["upcoming", "past", "cancelled"] },
{ key: "status", label: "Status", options: ["upcoming", "past", ["cancelled", "canceled"]] },
{ key: "is_published", label: "Published", options: [["1", "Live"], ["0", "Hidden"]] },
{ key: "is_listed", label: "Listed", options: [["1", "Listed"], ["0", "Link only"]] },
],
@ -128,7 +128,7 @@ export const events = {
path: "status",
label: "Status",
widget: "select",
options: ["upcoming", "past", "cancelled"],
options: ["upcoming", "past", ["cancelled", "canceled"]],
blankLabel: "Default: derive from end date",
},
{
@ -146,7 +146,7 @@ export const events = {
fields: [
{ path: "event_logo", label: "Event logo", widget: "image", folder: "logos", resolve: mediaUrl, full: true },
{ path: "org_logo", label: "Org logo override", widget: "image", folder: "logos", resolve: mediaUrl, full: true },
{ path: "color", label: "Colour", widget: "color" },
{ path: "color", label: "Color", widget: "color" },
{
path: "card_image",
label: "Card background",

View file

@ -55,7 +55,7 @@ export const frontPage = {
label: "Background",
widget: "select",
options: [
["brand", "Brand: animated colour and the dove"],
["brand", "Brand: animated color and the dove"],
["photos", "Photos: cycles through the photos below"],
],
blankLabel: "Default: brand",

View file

@ -41,7 +41,7 @@ export const organizations = {
{ path: "name", label: "Name", required: true },
{ path: "short_name", label: "Short name" },
{ path: "tagline", label: "Tagline", full: true },
{ path: "color", label: "Colour", widget: "color" },
{ path: "color", label: "Color", widget: "color" },
{ path: "logo", label: "Logo", widget: "image", folder: "logos", resolve: mediaUrl, full: true },
],
},

View file

@ -228,10 +228,10 @@ export const linksChild = {
organization or a person, never both, which the CHECK on
event_hosts enforces and this form can only ask nicely about.
The first row supplies the logo and colour when the event sets
The first row supplies the logo and color when the event sets
neither, so the order here is data rather than a display choice.
A person supplies neither: there is no colour on a person and a
headshot is not a logo, so a person-hosted event with no colour
A person supplies neither: there is no color on a person and a
headshot is not a logo, so a person-hosted event with no color
of its own falls through to the section default. */
export const hostsChild = {
key: "event_hosts",

View file

@ -12,7 +12,7 @@ const SITE_PAGES: [string, string][] = Object.entries(siteConfiguration.pages).m
/* The palette an admin can change, in the order the dropdown lists
it: token and label. The defaults come from the server's list
(server/src/themeDefaults.js), which the build checks against
src/index.css, so there's one copy of each colour to change. */
src/index.css, so there's one copy of each color to change. */
const THEME_LABELS: [string, string][] = [
["ink", "Headings"],
["body", "Body text"],
@ -162,15 +162,15 @@ export const siteSettings = {
children: [
{
key: "colors",
label: "Colours",
note: "Change any of the site's colours, for light mode, dark mode or both; a blank keeps the default. Saving refuses a palette that would make text hard to read (under 4.5:1). Changes show on the next page load.",
addLabel: "Change a colour",
title: (row) => THEME_COLORS.find(([token]) => token === row.token)?.[1] ?? "New colour",
label: "Colors",
note: "Change any of the site's colors, for light mode, dark mode or both; a blank keeps the default. Saving refuses a palette that would make text hard to read (under 4.5:1). Changes show on the next page load.",
addLabel: "Change a color",
title: (row) => THEME_COLORS.find(([token]) => token === row.token)?.[1] ?? "New color",
blank: { token: "", light: "", dark: "" },
fields: [
{
path: "token",
label: "Colour",
label: "Color",
widget: "select",
options: THEME_COLORS.map(([token, label]) => [token, label]),
required: true,

View file

@ -46,7 +46,7 @@ export const teams = {
},
{ path: "name", label: "Name", required: true, help: "Board, Leadership Team" },
{ path: "tagline", label: "Tagline", full: true },
{ path: "color", label: "Colour", widget: "color" },
{ path: "color", label: "Color", widget: "color" },
{ path: "logo", label: "Logo", widget: "image", folder: "logos", resolve: mediaUrl, full: true },
],
},

View file

@ -1,14 +1,14 @@
/* ═══════════════════════════════════════════════════════════════
COLOR
Two helpers for colours that arrive as data (a page's accent, an
event's or region's colour), so they work with the theme tokens
Two helpers for colors that arrive as data (a page's accent, an
event's or region's color), so they work with the theme tokens
in index.css as well as with hex.
withAlpha(color, 20) is that colour at 20% opacity, for tints and
withAlpha(color, 20) is that color at 20% opacity, for tints and
borders. It replaces `${color}33`, which only works on hex.
accentText(color) is that colour as text: itself in light mode,
accentText(color) is that color as text: itself in light mode,
mixed halfway to white in dark mode (--accent-text-mix), so an
accent picked for a white page still reads on a dark one.
═══════════════════════════════════════════════════════════════ */
@ -19,8 +19,8 @@ export const withAlpha = (color: string, percent: number): string =>
export const accentText = (color: string): string =>
`color-mix(in srgb, ${color} var(--accent-text-mix), #ffffff)`
/* Text for on top of a colour that arrives as data: white or deep
ink, whichever has more contrast (WCAG), so a pale colour an admin
/* Text for on top of a color that arrives as data: white or deep
ink, whichever has more contrast (WCAG), so a pale color an admin
picks still gets readable text. Anything that isn't #rrggbb (a
CSS variable, say) gets white, which suits the site's own dark
accents. */
@ -40,8 +40,8 @@ export function readableOn(color: string): string {
/* ── The site's accents ──────────────────────────────────────────
BRAND is the teal every page uses as its accent; it's the button
token, so the admin's palette (Site settings → Colours) reaches it.
ACCENTS are the other section colours a page may give a band, all
token, so the admin's palette (Site settings → Colors) reaches it.
ACCENTS are the other section colors a page may give a band, all
from the same family and all readable as text on white and on the
tints (5:1 or better). Use these rather than a new hex. */
export const BRAND = 'var(--color-action)'

View file

@ -4,7 +4,7 @@
Turns the link an admin pastes into the URL an <iframe> can
load. People paste the page they're looking at (a YouTube watch
or live link, a Facebook video, a Vimeo page), not the embed
form, so those are recognised and rewritten. Anything else that
form, so those are recognized and rewritten. Anything else that
is https is assumed to already be an embed URL and passed
through; anything that isn't https is refused, so the hero never
frames a plain-http or javascript: URL.

View file

@ -7,7 +7,7 @@
What this is not: event_scopes. A scope owns presentation:
Retreats.tsx keys its title, accent and background on the id, so
an unrecognised scope_id makes an event vanish with no error,
an unrecognized scope_id makes an event vanish with no error,
which is why that one is a real table with a real foreign key. A
type carries no presentation of its own and an unknown value
renders as its own name, so a CHECK is enough.

View file

@ -18,7 +18,7 @@
── On missing ids ──
Every builder takes an id the caller believed it had. When it
doesn't, the old behaviour was to interpolate the string
doesn't, the old behavior was to interpolate the string
"undefined" into a path, render a link to it, mount a page and
fetch /api/organizations/undefined, four steps between the
mistake and any sign of it, none of which name the component

View file

@ -9,7 +9,7 @@
const { organizations } = useOrganizations("partner");
const { organizations } = useOrganizations(); // all
Every organization has the same card surface, name, colour,
Every organization has the same card surface, name, color,
logo, description, links. What differs by kind sits under
`details`, so a list component can render the common parts
without knowing what it's holding:

View file

@ -27,7 +27,7 @@ export function qrMatrix(text: string, level: QrLevel): QrMatrix {
return { size: modules.size, dark: (row, col) => modules.get(row, col) === 1 }
}
/* The dark modules as one SVG path, a run of horizontal neighbours
/* The dark modules as one SVG path, a run of horizontal neighbors
per subpath, offset by the quiet zone. One element instead of a
rect per module keeps the markup (and the SVG download) small. */
export function qrPath(matrix: QrMatrix, margin: number): string {

View file

@ -6,7 +6,7 @@
const { data, error, loading } = useResource("/events");
Note the `ignore` flag rather than an AbortController: the
request is shared and cached, so cancelling it would throw away
request is shared and cached, so canceling it would throw away
work another component may still want. We just stop writing
state after unmount.
═══════════════════════════════════════════════════════════════ */