Sourced from i18next-cli's changelog.
1.90.0
Found by running
init,instrument,extract,lintandstatuson the next-i18next examples, on copies of them with their texts hardcoded again (to compare the rewrite with the hand-written original) and on hardcoded Next.js apps, and reading every rewrite.next-i18next:
- feat(instrument): a Next.js app with next-i18next (a dependency, or imported), or with no i18next at all, gets next-i18next's calls by where each file renders, from the import graph (
'use client',app/,pages/, imports relative, through the tsconfig or jsconfigpathsand from the project root):const { t } = await getT()in Server Components, which becomeasync(a return type becomesPromise<…>),useT()fromnext-i18next/clientin Client Components,useTranslationfromnext-i18next/pagesin the Pages Router. Server Components gotuseTranslation()before, a client hook that fails there. A Next.js app with i18next or react-i18next and no next-i18next keepsreact-i18next.- feat(instrument): a
<Trans>in a Server Component getst={t} i18n={i18n}and comes fromreact-i18next/TransWithoutContext;getTcomes from the module the app imports it from (its owncreateServerI18nextfile) when that is notnext-i18next/server.- feat(instrument):
generateMetadata()and other async functions of a Server Component file getgetT(), andexport const metadata = { title: '…' }becomesexport async function generateMetadata ()returning it. They goti18next.t()before, which next-i18next does not initialize.- feat(instrument): left as they are, each named in a warning: components that Server and Client Components both render (no
tworks in both) unless they gett(andi18nfor a<Trans>) as props, files no route imports, texts outside components, API routes, Server Actions and cached functions ('use server','use cache'), Server Components wrapped inmemo()/forwardRef(), and language switches, which next-i18next makes through the route oruseChangeLanguage()(a call of that switch goti18n.changeLanguage()added before).- fix(instrument): no
i18n.tsinit file and no import of it in_appor the root layout for next-i18next, which sets i18next up itself; the setup steps are printed when it is not set up yet, and the pages that load no translations (noserverSideTranslations()in them or in a helper they import) are named.- feat(init): the defaults the app's setup decides: the source glob covers the directories that exist (
{app,components}/**/*rather thansrc/**/*, where a Next.js app withoutsrc/has no file), next-i18next'sdefaultNS(commonunless its config says otherwise, soextractwrites the keys ofuseT()to the namespace next-i18next loads),messageFormatfor i18next-icu or i18next-mf2, andkeySeparator: falsefor flat keys with dots, whichextractnested before.lintandstatuswithout a config detect the same.Any React app:
- fix(instrument): an import went before a
'use client'directive in a file without imports, which ends the directive.- fix(instrument): a component that calls a translation hook without taking
t(const { i18n } = useT('ns')) got a second hook call;tnow comes from that call and its namespace (const { t, i18n } = useT('ns')), unless a text comes before the call.- fix(instrument): a function that is no component but binds
tfrom a translation hook (a custom hook,generateMetadatawithgetT()) goti18next.t(); atfromgetFixedT()counted as atof another kind.- fix(instrument): the texts and
valuesofIcuTrans,IcuTransWithoutContextandTransWithoutContextwere translated (values={{ name: t('ada', 'Ada') }}).- fix(instrument): an empty element at the edge of a sentence (
<hr />,<br />) went into its<Trans>.- fix(instrument):
next-i18next v{pkg.version}was split into at()of its first part: a word with digits in a later part (i18next) now counts as a word beside a placeholder.
... (truncated)
cbc2e8a
1.90.0326b112
feat(instrument): next-i18next calls by where a file renders: getT() in
Serve...f3659b1
1.89.03ed2035
feat(instrument): handle a real app: no broken code, fewer false
positives, m...429e5b6
1.88.15b76569
changelog for 1.88.1cd51160
fix(extract): resolve the members of Omit, Pick, Partial, Required,
Readonly ...a784cd2
docs(skill): the conventions to drop in are CLAUDE.md or AGENTS.mdfcc7b4c
docs: list the next-intl vs next-i18next post among the places that
carry the...