2.3 KiB
2.3 KiB
Terminology
This repo now has a central terminology registry for admin-facing labels and key product nouns.
Source of truth
- Frontend terminology lives in
frontend/src/lib/terminology.js - The default locale is
en-NZ - Admin pages should import the shared registry instead of hardcoding repeated labels
Current structure
frontend/src/lib/terminology.js exports:
DEFAULT_TERMINOLOGY_LOCALETERMINOLOGY_LOCALESgetTerminology(locale)terminology
The registry is grouped into:
commonentitiesadmin
Example:
import { terminology as t } from '$lib/terminology';
const clientLabel = t.entities.client.singular;
const sectionLabel = t.admin.sections.clients;
const pageTitle = t.admin.clients.title;
How to update wording
If you want to rename a repeated term like Client, Clients, Leads, Home, or Reporting, update the relevant key in:
frontend/src/lib/terminology.js
Any page already wired to the shared registry will pick up the new label automatically.
Adding a new locale later
- Add another top-level locale entry to
TERMINOLOGY_LOCALES - Mirror the same object shape as
en-NZ - Switch the selected locale through
getTerminology(locale) - Avoid hardcoding user-facing copy in components if it belongs in the registry
Example outline:
export const TERMINOLOGY_LOCALES = {
'en-NZ': { ... },
'fr-FR': { ... },
};
Guidance
- Put repeated UI labels and key nouns in the terminology registry
- Keep one-off implementation details out of the registry unless they are also user-facing copy
- Prefer full copy keys for phrases that may need different grammar in another language
- If a page repeats the same wording in multiple places, move it into the registry
Current admin coverage
The shared terminology registry is already wired into:
frontend/src/routes/admin/+layout.sveltefrontend/src/routes/admin/+page.sveltefrontend/src/routes/admin/members/+page.sveltefrontend/src/routes/admin/members/new/+page.sveltefrontend/src/routes/admin/members/[id]/+page.sveltefrontend/src/routes/admin/leads/+page.sveltefrontend/src/routes/admin/messages/+page.sveltefrontend/src/routes/admin/bookings/+page.sveltefrontend/src/routes/admin/walks/+page.sveltefrontend/src/routes/admin/audit/+page.svelte