nextjs-intl-translation-structure-consistency
Installation
SKILL.md
Next.js i18n Translation Structure Consistency
Problem
When working with next-intl in TypeScript projects, adding new translation sections can cause cryptic type errors if the structure doesn't match exactly across all locale files. TypeScript requires all locale files to have identical key structures (including key naming conventions and nested sections).
Context / Trigger Conditions
This issue occurs when:
- Error message pattern:
error TS2322: Type '{ ... }' is not assignable to type '{ ... }'. The types of '"sectionName"["subsection"]' are incompatible between these types. Property '"missingKey"' is missing in type '{ ... }' but required in type '{ ... }'.