chore(audit-drain): rip out next-intl, RTL lint, sweeps, polish

Drain the long-tail audit queue captured in alpha-uat-master.md.

- next-intl ripped out (zero useTranslations callers ever existed):
  package.json, next.config.ts plugin wrap, src/i18n/, messages/, and
  the layout NextIntlClientProvider all gone; <html lang="en"> hardcoded.
- RTL lint nudge added: warn-only no-restricted-syntax on physical
  Tailwind utilities (ml-/mr-/pl-/pr-/text-left/text-right/border-l/
  border-r/rounded-l-/rounded-r-) inside JSX className literals.
  Existing ~1,000 sites grandfathered; new code trends toward logical.
- Icon-only button accessibility lint: jsx-a11y/control-has-associated-
  label enabled at warn; 4 empty <th>/<td> action placeholders gain
  sr-only labels.
- Currency: SUPPORTED_CURRENCIES drops the hardcoded English labels;
  new currencyLabel(code, locale?) helper resolves via Intl.DisplayNames.
  CurrencySelect + settings-manager migrated.
- Date locale sweep: 7 surfaces flip from toLocaleString('en-GB'|'en-US')
  to toLocaleString(undefined, ...) so dates honour runtime locale.
- Dialog/Sheet width: 10 document/EOI/entity-form dialogs gain a
  lg:max-w-4xl or lg:max-w-5xl step so wide desktops get breathing room.
- PaymentsSection collapsed-bar: slim one-line bar showing
  "Payments - Not received yet" or "Payments - \$X received - N payments
  - Expand"; per-interest collapse state persists in localStorage; the
  RecordPayment flow auto-expands.
- muted-foreground opacity sweep: 10 text-bearing
  text-muted-foreground/{60,70,80} hits dropped to plain
  text-muted-foreground for AA contrast on muted bg. Icon-only
  (aria-hidden) opacity hits left as-is.
- Micro-type bump: text-[10px] and text-[11px] -> text-xs (12px)
  across 87 files in src/components + src/app. Pure mechanical sweep.
- Audit-doc cleanup: alpha-uat-master.md stale 2026-05-25 summary
  rewritten with cumulative state through today. Items genuinely still
  open are now a short long-tail list.
- New docs/marketing-site-followups.md: Umami Phase 4a/3/5, email
  pixel E2E verification, and website-cutover work parked here so
  they don't get lost in the CRM audit doc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 18:48:46 +02:00
parent 353a31323e
commit e9509dc45c
115 changed files with 528 additions and 776 deletions

View File

@@ -8,28 +8,47 @@
*/
export const SUPPORTED_CURRENCIES = [
{ code: 'USD', symbol: '$', label: 'US Dollar' },
{ code: 'EUR', symbol: '€', label: 'Euro' },
{ code: 'GBP', symbol: '£', label: 'British Pound' },
{ code: 'CAD', symbol: 'CA$', label: 'Canadian Dollar' },
{ code: 'AUD', symbol: 'A$', label: 'Australian Dollar' },
{ code: 'CHF', symbol: 'CHF', label: 'Swiss Franc' },
{ code: 'JPY', symbol: '¥', label: 'Japanese Yen' },
{ code: 'AED', symbol: 'د.إ', label: 'UAE Dirham' },
{ code: 'SGD', symbol: 'S$', label: 'Singapore Dollar' },
{ code: 'HKD', symbol: 'HK$', label: 'Hong Kong Dollar' },
{ code: 'PAB', symbol: 'B/.', label: 'Panamanian Balboa' },
{ code: 'XCD', symbol: 'EC$', label: 'East Caribbean Dollar' },
{ code: 'BSD', symbol: 'B$', label: 'Bahamian Dollar' },
{ code: 'KYD', symbol: 'CI$', label: 'Cayman Islands Dollar' },
{ code: 'BBD', symbol: 'Bds$', label: 'Barbadian Dollar' },
{ code: 'DOP', symbol: 'RD$', label: 'Dominican Peso' },
{ code: 'JMD', symbol: 'J$', label: 'Jamaican Dollar' },
{ code: 'TTD', symbol: 'TT$', label: 'Trinidad & Tobago Dollar' },
{ code: 'USD', symbol: '$' },
{ code: 'EUR', symbol: '€' },
{ code: 'GBP', symbol: '£' },
{ code: 'CAD', symbol: 'CA$' },
{ code: 'AUD', symbol: 'A$' },
{ code: 'CHF', symbol: 'CHF' },
{ code: 'JPY', symbol: '¥' },
{ code: 'AED', symbol: 'د.إ' },
{ code: 'SGD', symbol: 'S$' },
{ code: 'HKD', symbol: 'HK$' },
{ code: 'PAB', symbol: 'B/.' },
{ code: 'XCD', symbol: 'EC$' },
{ code: 'BSD', symbol: 'B$' },
{ code: 'KYD', symbol: 'CI$' },
{ code: 'BBD', symbol: 'Bds$' },
{ code: 'DOP', symbol: 'RD$' },
{ code: 'JMD', symbol: 'J$' },
{ code: 'TTD', symbol: 'TT$' },
] as const;
export type SupportedCurrencyCode = (typeof SUPPORTED_CURRENCIES)[number]['code'];
/**
* Localized human-readable label for an ISO currency code (e.g.
* 'USD' → 'US Dollar' in English, 'dolar estadounidense' in Spanish).
* Uses `Intl.DisplayNames`, so the result tracks the user's locale
* automatically. Falls back to the bare code when the runtime can't
* resolve a name (e.g. unknown code or older Node without DisplayNames).
*/
export function currencyLabel(code: string, locale?: string): string {
const upper = code.toUpperCase();
try {
const display = new Intl.DisplayNames(locale ? [locale] : undefined, {
type: 'currency',
});
return display.of(upper) ?? upper;
} catch {
return upper;
}
}
const SUPPORTED_SET: ReadonlySet<string> = new Set(SUPPORTED_CURRENCIES.map((c) => c.code));
/**