Step 002 complete. Step 003 needs verification

This commit is contained in:
2026-04-13 09:49:51 +02:00
parent e85b3fbfb2
commit 542d8ca9f7
92 changed files with 1248 additions and 4 deletions

View File

@@ -34,6 +34,25 @@ Defines the content localisation system for the Qumo website, including the JSON
- **WHEN** `getContent("fr")` or any unrecognized locale string is called
- **THEN** the function SHALL return the parsed contents of `src/content/en.json`
### Requirement: Locale content JSON files contain nav strings
`src/content/en.json` and `src/content/nl.json` SHALL each contain a top-level `"nav"` key with the following structure:
- `links`: array of objects with `label: string` and `href: string` for each nav link
- `cta`: string — label for the Connect CTA button
- `ctaHref`: string — href for the Connect CTA button
- `langSwitch`: object with `en: string` and `nl: string` labels for the language switcher
#### Scenario: en.json nav section has correct structure
- **WHEN** `src/content/en.json` is parsed as JSON
- **THEN** it SHALL have a `nav` object containing `links` (array of 3 items with `label` and `href`), `cta` string, `ctaHref` string, and `langSwitch` object with `en` and `nl` keys
#### Scenario: nl.json nav section has Dutch labels
- **WHEN** `src/content/nl.json` is parsed as JSON
- **THEN** `nav.links` SHALL contain Dutch labels ("Diensten", "AI Launchpad", "Over Ons"), `nav.cta` SHALL be "Verbind", and `nav.ctaHref` SHALL be "/nl/contact"
#### Scenario: Build succeeds with nav strings added
- **WHEN** `npm run build` is executed after adding `nav` keys to both JSON files
- **THEN** the build SHALL complete without TypeScript errors
### Requirement: Content files use static imports (no runtime fetch)
The `i18n.ts` helper SHALL use static ES module imports (`import enContent from './en.json'`) rather than dynamic `fetch` or `fs.readFile`. This ensures type safety and tree-shaking at build time.