Sourced from i18next-cli's changelog.
1.96.1
- fix(lint):
checkInterpolationParamsno longer reports a formatter option passed at the root of the t() options ({ defaultValue: 'Betrag: {{amount, currency}}', amount, currency }) as unused: with a formatted interpolation in the string, i18next hands every option to the formatter. A regression in 1.96.0 for calls with adefaultValue(#375)1.96.0
- fix(sync): empty plural forms a language needs beyond the primary's (
_manyin French,_few/_manyin Russian) are kept instead of removed, soextractandsyncno longer undo each other andextract --cipasses aftersync. Thanks@mokshupadhyay(#356, #359)- fix(types): a newly generated
i18next.d.tssetskeySeparator,nsSeparator,pluralSeparator,contextSeparator,interpolationPrefixandinterpolationSuffixinCustomTypeOptionswhenextractsets them to something other than i18next's defaults (falsefor a disabled separator). Before,t('common::title')withnsSeparator: '::'did not compile, and a flat key with a.(keySeparator: false) or a{name}placeholder lost its value type and variable checks. An existingi18next.d.tsis not rewritten. Thanks@mokshupadhyay(#357, #358)- fix(lint):
checkInterpolationParamsreads params like i18next: the keys of a literalreplaceare the variables (keys next to it are unused), and a spread, a computed key or a non-literalreplaceno longer reports a variable as not provided. Thanks@mokshupadhyay(#360, #362)- fix(lint): interpolation issues are reported on the line of their own
t()call, so an earlier call, string or comment with the same key no longer takes the line, andi18next-instrument-ignore-next-lineapplies to the right call. Thanks@mokshupadhyay(#361, #362)- fix(skill): the
i18next-localizationskill has the agent add locize-agents'CONVENTIONS.mdto the project'sAGENTS.mdorCLAUDE.md; that repository no longer has aCLAUDE.mdorAGENTS.mdto copy.- fix(extract): a literal
formatin a<Trans>interpolation object is written as react-i18next builds it ({{ total, format: 'number' }}gives{{total, number}},{total, number}with ICU, not{{total, format}}), and a child wrapped insatisfiesis read like one wrapped inas. The default value is now formatted, and a key withouti18nKeymatches the one react-i18next looks up. Such keys change on the nextextract, and their old entries, which never rendered, are removed. Thanks@mokshupadhyay(#363, #365)- fix(status):
--namespacescopes the exit code and the summary to that namespace, like the locale argument since 1.64.2. A locale that is not configured, a namespace the code does not use and a translation file that cannot be parsed now exit 1 instead of 0, and the "Incomplete translations detected" line prints again (lost since 1.80.6). Thanks@mokshupadhyay(#364, #366)- fix(migrate-config): an i18next-parser config's
keepRemoved(asremoveUnusedKeys: false),pluralSeparator(falseasdisablePlurals: true),indentation, key order (sort: falseunless it sorted) and the lexers' functions, components and hooks (next tot,TransanduseTranslation) are carried over, and the options without an equivalent get a warning, so the firstextractafter the migration no longer deletes translations. Thanks@mokshupadhyay(#367, #368)- fix:
extractwithremoveUnusedKeysno longer slows down quadratically with the number of keys in the plural-form and_zeropreserve passes: the extracted base keys are looked up in a Set built once per namespace instead of being scanned per existing key, and the written files are byte-identical (10,000t()calls: 24 s before, 0.6 s now). Thanks@ca057(#355,
... (truncated)
3d762e0
1.96.1673d25e
changelog for 1.96.16d4e43c
fix(lint): don't report a root-level formatter option as unused (#375)124ac45
1.96.0d6ddf86
changelog for 1.96.03ed58e9
changelog: #373
and #374
under Unreleased29a53f9
fix(lint): check the default value, else the key, for an empty primary
value ...8f9dfd3
fix(lint): don't require a nested $t() key's variables of the outer call
(#373)86960e9
changelog: #371
under Unreleased0fb6381
feat(lint): accept glob patterns in lint.acceptedAttributes and
lint.ignoredA...