Skip to content

i18n: en/de key parity breaks (photoAnnotator, budget.json) and hardcoded English error strings in usePhotos #1814

Description

@steilerDev

Severity: Medium — found during a deep project review (2026-07-06). A full en/de key-parity diff across all 14 namespaces found only these mismatches (everything else has exact parity, and namespace registration in client/src/i18n/index.ts is clean).

Findings

  1. photoAnnotator: 5 keys missing in declient/src/i18n/de/photoAnnotator.json lacks reset, resetTitle, resetBody, resetConfirm, resetComplete (present in en). Note: no code references these keys (PhotoAnnotator.tsx/ToolPalette.tsx have no reset usage) — they are also orphaned in en. Either wire them up + translate, or remove from en.
  2. budget: 2 dead de-only keysclient/src/i18n/de/budget.json has overview.costBreakdown.autoOriginBadge.label and .ariaLabel absent from en; no code references them. Remove from de.
  3. usePhotos hardcodes English error strings, bypassing translateApiErrorclient/src/hooks/usePhotos.ts:55-59 sets 'Failed to load photos.', 'Network error: Unable to connect to the server.', 'An unexpected error occurred.' directly into UI state. Route through translateApiError() / translated keys.

Suggested guard

Add a key-parity unit test (compare key sets of every en/de namespace pair) so parity breaks fail CI instead of accumulating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions