Sourced from i18next-cli's changelog.
1.91.3
- fix(lint): the interpolation parameter check reads a key's translation from the file of its namespace, so a missing or unused parameter is now reported outside the default namespace too:
useTranslation('home'),t('home:greeting'),t('greeting', { ns: 'home' })and selector calls, with akeyPrefix, in a merged single-file output and withdefaultNS: false. Before, only the default namespace's file was read, so these calls went unchecked. The default namespace isextract.defaultNS(translationwhen unset) like inextract;lintno longer falls back to acommon.jsonordefault.json. The variables of every plural form of a key count.1.91.2
- feat(extract): the warning for an
.astrofile inextract.inputthat no plugin handles names the fix: the new official i18next-cli-plugin-astro, which letsextractandstatusfind the keys in.astrofiles.1.91.1
- fix(extract): a nested
$t()option whose name only containscountorcontext({"discount": 5},{"subcontext": "vip"}) is no longer read as a plural or context reference, soextractkeepspriceinstead of writing emptyprice_one/price_other, andremoveUnusedKeysno longer drops the existing translation (#332, thanks@zzoraemon043).- fix(extract): the options of a
t()call in a comment are read by their whole name too:// t('price', { discount: 5 })no longer extractsprice_one/price_other,{ subcontext: 'vip' }no context key and{ dns: 'other' }noothernamespace. A quoted name ({ "count": 2 }) now counts like an unquoted one.- chore(deps): i18next 27.2.2, react-i18next 18.0.3, nano-spawn 3 and other dependency updates.
1.91.0
- feat(lint):
<Trans>tags of a translation that miss the component's children are reported, with file, line andns:key.<Trans>numbers its children, text included, so the{' '}a formatter inserts at a line break shifts every later index: inEach reminder needs{' '}<Bold>a contact</Bold>,<Bold>is<2>, and a translation with<1>a contact</1>rendersEach reminder needswithout an error anywhere. The tags of the primary language (context and plural forms included) are resolved like react-i18next does at runtime, and a tag on a text child, past the last child, empty on an element with text, or with content on a<br/>is reported. A<Trans>withcomponentsis skipped. Configure withlint.checkTransIndices('warn'by default). Fixes #331.- fix(extract): an
at the end of a line inside<Trans>is a child of its own, as Babel and SWC compile it, and takes an index in the default value. It was dropped like formatting whitespace, so every later index was one too low:Price ⏎<b>x</b> ⏎<em>y</em>extracted<2>y</2>, which renders the space instead ofy.
53034d4
1.91.3955e8e8
changelog for 1.91.3cec2d00
fix(lint): check interpolation parameters in the namespace of the
calle7d4b71
1.91.26183df4
changelog for 1.91.2ae46f85
docs: the official i18next-cli-plugin-astro next to the Vue and Svelte
plugin...22bc29e
feat(extract): name i18next-cli-plugin-astro in the warning for an
unhandled ...d1866a8
1.91.151bda75
changelog for 1.91.1301bdfa
chore(deps): update dependencies, i18next 27.2.2, react-i18next 18.0.3
and na...