---
id: w5/m3/t007
title: Simplify the i18n code this milestone added
worker: worker5
status: done
estimate: 30m
depends_on: [w5/m3/t006]
---

## Objective

Run `/simplify` over the code this milestone changed — reuse, simplification,
efficiency, altitude — without changing behavior.

## Context

- Scope: the i18n core (`src/i18n/**`), `use-translations`, the switcher, the
  detection/persistence helpers, the extracted-string call sites, and the Ory
  config wiring.
- Watch for: duplicated aggregation boilerplate across locale namespaces, a
  hand-rolled control where a shadcn primitive fits, detection logic split
  awkwardly across server/client, and any dead reference-project idioms copied in
  but unused here.

## Steps

1. `/simplify` over the milestone's diff.
2. Apply behavior-preserving cleanups; re-run `yarn lint` / `yarn typecheck` / `yarn test`.

## Files

- Whatever t001–t006 touched.

## Acceptance criteria

- [ ] No behavior change; language switching + SSR/Ory localization still work.
- [ ] `yarn lint` / `yarn typecheck` / `yarn test` pass.

## Out of scope

- New features or additional languages.
</content>
