Add French (fr) interface language

Merged
GU
1mo ago
+1852-5

Focused follow-up to #4705, which was closed because it mixed in unrelated changes. This PR contains only the French translation: no renaming, no default-language change, no Ollama or packaging work.

Changes

  • src/i18n/locales/fr/*.json: French catalogs for common, settings, chat, home and errors, in sync with the current en keys on main.
  • src/i18n/index.ts: registers the fr resources.
  • src/components/LanguageSelector.tsx: lists "Français" (fr is already in LanguageSchema).
  • Tests:
    • src/i18n/fr_locale.test.ts: key and {{placeholder}} parity with en, one i18n.t lookup per namespace so a missing registration fails, and French plural forms.
    • test_gate_locales.test.ts and SubscriptionStatusBanner.test.tsx cover fr.
  • Docs: rules/i18n.md and PRODUCT.md list the current locales and the French non-breaking-space convention (  escape before :, ?, ! and inside « »).

The cubic review notes from #4705 that apply to these files are addressed: namespace registration coverage,   escapes and the stale locale count.

Testing

  • npx vitest run src/i18n src/components/SubscriptionStatusBanner.test.tsx: 41 passed
  • npm run ts, prettier --check and oxlint are clean.

🤖 Generated with Claude Code