Docs truth-sweep against ground truth (package.json, CI workflows): - npm → pnpm across evergreen docs (pnpm 11.25.0 is the package manager; npx tsx → pnpm exec tsx, npx ts-prune/jscpd → pnpm dlx, npm ci → pnpm install --frozen-lockfile, package-lock.json → pnpm-lock.yaml) - Jest → Vitest in README, CONTRIBUTING, COMMANDS (vitest 4 is installed) - Node claims: README 20+ → 22.13+ (engines) with CI/deploy on 24; deployment.md "Setup Node 20 (npm cache)" → Node 24 (pnpm cache), and the pipeline line now shows `pnpm run verify` as CI actually runs - TypeScript 5.x claims → 6 (typescript ^6.0.3); Next.js 14 → 16 in BLOG_SYSTEM, guides/ARCHITECTURE, AI_BOT_SYSTEM_PROMPT - COMMANDS.md: dropped nonexistent `dev:cms` script; services list fixed to db/meilisearch/listmonk (no redis in compose) - HR_RUNBOOK: `npm run test -- src/…` → `pnpm run test src/…` (pnpm passes args without the `--` separator) Historical records (docs/archive/**, dated audit reports, UPGRADE_PLAN) left as-is — they describe what was true when written. Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
4.2 KiB
Translation workflow
Status (2026-06-03): DE is the canonical source. Non-DE locales have 186–254 missing keys each. Total: ~1334 missing entries across 6 locales. Page renders use deepMerge(de, locale) in src/i18n/request.ts, so a missing key falls back to the German string — users see German, never the literal key.
When to translate
A missing key is never a crash. The question is whether the German fallback degrades the experience enough to justify cost:
| Audience | Where they land | Acceptable? |
|---|---|---|
| Marketplace buyer (FR/IT/EN) | /marketplace, listing detail, checkout |
No — high commercial impact, translate first |
| Donor (any locale) | /get-involved/donate, /projects/* |
No — mission-facing |
| Admin staff | /admin/* |
Partially — chrome, nav and section labels are translated (admin.sections, admin.sidebar, admin.commandBar, …); page bodies still fall back to DE |
| About / impact reader | /about, /transparenz |
No — reputation-facing |
The admin area follows the user's language preference (NEXT_LOCALE cookie, switchable from the admin top bar / user menu). Untranslated admin keys fall back to German via the deep-merge — acceptable, since staff are DE-fluent; translate opportunistically when a page is touched.
Workflow
# 1. Generate per-locale "missing keys" inventory
pnpm run i18n:missing
# → writes messages/_missing/<locale>.json (gitignored)
# 2. Send the file to a translator. Format is:
# { "shop.foo": { "de": "Foo", "translation": null }, ... }
# Translator fills in every "translation" string.
# 3. Merge translations back:
# pnpm run i18n:apply <locale>
# → safe: never overwrites existing non-empty values; surfaces conflicts
# (existing differs from candidate) for manual review.
Priority queue (by audience impact)
Generated by namespace, biggest user-impact first:
marketplace.*— every non-DE locale has 5–13 missing keys here. Fast win.shop.*— 8 missing per non-EN locale, fewer for EN.projects.*— 25 missing per non-EN locale (the new Monitor-Upcycling content).dashboard.*— 19 missing per non-EN locale.about.*/transparenz.*— 5–8 missing per locale.admin.*— low priority (staff are DE-fluent; DE fallback is fine). Nav/chrome are already translated; page bodies can follow opportunistically.
How to receive translator output
Translator returns a filled-in messages/_missing/<locale>.json. Merge:
pnpm run i18n:apply <locale>
pnpm run i18n:missing # verify count dropped
Apply-script behavior:
- Skips entries where
translationis null / empty / whitespace (partial returns are fine). - Skips keys that already match the candidate (idempotent re-runs).
- Surfaces conflicts when an existing translation differs from the candidate — does NOT overwrite; resolve manually then re-run.
Don't machine-translate UI
Tempting but wrong:
- Google Translate / DeepL output for UI strings produces grammatically-correct but tonally-off translations (formal vs informal, button voice, region quirks like Swiss-German vs DE-DE).
- A mediocre translation is worse than DE fallback — users assume the site is in their language and stop noticing weirdness, missing real comprehension issues. DE fallback is honest about the gap.
- The 1334-string load is ~4–8 hours of focused work for a fluent translator with the DE source in front of them — not a script.
Costs (rough estimate)
| Locale | Missing | Translator time | Cost @ CHF 0.20/word |
|---|---|---|---|
| EN | 186 | 2–3 h | ~CHF 90 |
| FR | 254 | 3–4 h | ~CHF 120 |
| ES | 218 | 3 h | ~CHF 100 |
| IT | 218 | 3 h | ~CHF 100 |
| JA | 229 | 4 h | ~CHF 110 |
| KO | 229 | 4 h | ~CHF 110 |
If budget allows only one: EN (lowest count, widest reader base). If two: EN + FR (Swiss market). Skip the rest until ROI is proven.
Detection over time
scripts/i18n-audit.mjs already exists and runs as part of pnpm run compliance. Pipe it into CI so a new key added in DE without a fallback plan surfaces immediately.
Last updated: 2026-06-03 — inventory generator added (scripts/i18n-missing.mjs), 1334 missing keys recorded.