1.0 KiB
1.0 KiB
FLXN
i18n (Lingui v6) — applies to every user-facing string
Any change that adds, edits, or removes user-visible text must follow the
i18n skill (.claude/skills/i18n/SKILL.md): wrap with context-bound Lingui
macros, then bun run extract, translate new entries in every non-en
locale, and bun run i18n:check. Adding a language: use the add-language
skill.
Hard rules (full detail in the skill):
- Only
Trans/Plural/useLinguifrom@lingui/react/macroandmsgfrom@lingui/core/macro. Never globalt/plural/selectfrom core/macro (SSR locale bleed). useLingui()at top level of components/hooks only; addt/i18nto memo dep arrays.- Never hand-edit msgids or
src/locales/en/messages.po(generated). - vite.config.ts babel plugin order (lingui before react-compiler) is load-bearing.
LinguiProviderstays ABOVEAuthProviderin providers.tsx (localized query hooks call useLingui), and__root'shead()must never readmatch/context (circular route-type inference breaks beforeLoad typing).