Sourced from i18next-cli's changelog.
1.74.7
- fix(extract): a selector
i18nKeyon<Trans t={t}>now routes into the hook's namespaces the same wayt()does, matching react-i18next 17.0.16. Withconst { t } = useTranslation(['ns1', 'ns2']),<Trans t={t} i18nKey={$ => $.ns2.message} />was filed asns1:ns2.message; it is now filed asns2:message, liket($ => $.ns2.message). Undertypes.enableSelector: 'strict'a leading primary namespace is stripped too (useTranslation('only')with$ => $.only.keyfilesonly:key). Reported in react-i18next#1933.- fix(extract): the props of a component typed
React.FC<Props>(alsoFC,FunctionComponent),forwardRef<Ref, Props>(…)ormemo<Props>(…)are typed byProps, and iterating a typed member binds the element.props.colors.map((color) => t(\Color.${color}`))withcolors: Color[]extracted nothing before unlesscolorwas asserted withas Color. Arrays of objects work the same way:props.items.map(({ kind }) => …),for (const item of props.items)and a destructured({ items }) => items.map(…)`. Fixes #303.1.74.6
- fix(extract): iterating an inline array literal binds the element like iterating a named constant does.
([1, 2, 3, 4] as const).map((q) => t(\QUARTER.${q}`)),for (const unit of ['day', 'hour'] as const)` and inline arrays of objects extracted nothing before. Fixes #301.- fix(extract): members of nested object types resolve.
t(\barStatus.${deepObject.Bar.status}`)andt(`fooBarStatus.${deepObject.Foo.Bar.status}`)now extract the nested union's values, also through references to other types, optional chaining (pet.category?.kind), destructuring (const { kind } = pet.category) and indexed access types (DeepObject['Bar']['status'],components['schemas']['Pet']), so types generated by openapi-typescript work. Nested members are followed up to five levels below the declared type, as incomponents.schemas.Pet.category.kind`. Fixes #302.
32291d2
1.74.78b3717d
fix(extract): type component props from React.FC, forwardRef and memo #3034c6314a
fix(extract): route a Trans selector key into the t prop's namespaces
like t()7f7e635
1.74.6a56b05f
fix(extract): resolve inline array literals and nested object types #301
#302