Sourced from i18next's releases.
v27.2.10
- fix: a formatter option that is empty or only whitespace in quotes stays a string instead of becoming
NaN:{{name, join(separator: ' ')}}passes' 'to the formatter, so a customjoinwrites "Anna Smith" instead of "AnnaNaNSmith". Thanks@arba-octo(#2485)- perf:
t()runs the natural-language key check only for a key that contains the namespace separator, instead of twice on every call. With the default separatorst()is about 30% faster; the results do not change. Thanks@ximex(#2486)- perf: without
debug,t()looks a missing key up once instead of twice. The second lookup only fed the debug warning about flat JSON, so output and logs do not change. Thanks@ximex(#2487)v27.2.9
- fix:
t('item', { count: 2n })picks the plural form instead of throwingTypeError: Cannot convert a BigInt value to a number: a BigIntcount(as some database drivers return forCOUNT(*)) is converted to a number forIntl.PluralRules,{{count}}still gets the BigInt, and0nlooks up_zerolike0. AboveNumber.MAX_SAFE_INTEGERthe form follows the rounded number. Thanks@Asimmimx(#2484)v27.2.8
- fix(types): a
t()call withcontextlooks the key up along its own path in the namespace it names, instead of matching it against every key of every namespace. With several large namespaces each such call cost up to millions of type instantiations and could fail with TS2589, a literalcontext: 'x'soonest. A context value without a key is still an error, as since 25.9.0 (#2482)- fix: a language code without subtags gets its language part in the same casing as a code with subtags: with
supportedLngs: ['en-US'],'EN'(from?lng=ENor a capitalised cookie) matches'en-US'like'en'and'EN-GB'already did, instead of falling back tofallbackLng, anddir('AR')returns'rtl'whereIntl.Localehas nogetTextInfo(). Thanks@anishkun(#2483)- fix:
dir()also returns'rtl'for'AR'or'AR-EG'withcleanCode: falsewhereIntl.Localehas nogetTextInfo()(Node.js 22, some browsers)
Sourced from i18next's changelog.
27.2.10
- fix: a formatter option that is empty or only whitespace in quotes stays a string instead of becoming
NaN:{{name, join(separator: ' ')}}passes' 'to the formatter, so a customjoinwrites "Anna Smith" instead of "AnnaNaNSmith". Thanks@arba-octo(#2485)- perf:
t()runs the natural-language key check only for a key that contains the namespace separator, instead of twice on every call. With the default separatorst()is about 30% faster; the results do not change. Thanks@ximex(#2486)- perf: without
debug,t()looks a missing key up once instead of twice. The second lookup only fed the debug warning about flat JSON, so output and logs do not change. Thanks@ximex(#2487)27.2.9
- fix:
t('item', { count: 2n })picks the plural form instead of throwingTypeError: Cannot convert a BigInt value to a number: a BigIntcount(as some database drivers return forCOUNT(*)) is converted to a number forIntl.PluralRules,{{count}}still gets the BigInt, and0nlooks up_zerolike0. AboveNumber.MAX_SAFE_INTEGERthe form follows the rounded number. Thanks@Asimmimx(#2484)27.2.8
- fix(types): a
t()call withcontextlooks the key up along its own path in the namespace it names, instead of matching it against every key of every namespace. With several large namespaces each such call cost up to millions of type instantiations and could fail with TS2589, a literalcontext: 'x'soonest. A context value without a key is still an error, as since 25.9.0 (#2482)- fix: a language code without subtags gets its language part in the same casing as a code with subtags: with
supportedLngs: ['en-US'],'EN'(from?lng=ENor a capitalised cookie) matches'en-US'like'en'and'EN-GB'already did, instead of falling back tofallbackLng, anddir('AR')returns'rtl'whereIntl.Localehas nogetTextInfo(). Thanks@anishkun(#2483)- fix:
dir()also returns'rtl'for'AR'or'AR-EG'withcleanCode: falsewhereIntl.Localehas nogetTextInfo()(Node.js 22, some browsers)
7839a3b
27.2.10a3d8272
changelog for 27.2.10b36d5e7
changelog: #2485,
#2486
and #2487
under Unreleased5743429
perf: look a missing key up only once when debug is off (#2487)78fe071
perf: run the natural-language key check only for a key with the
namespace se...4c02a17
fix: keep blank formatter options as strings (#2485)83e6f68
contributing: point to the organisation's page for what we merge and how
we r...add2f77
27.2.9dcc1487
changelog for 27.2.90933589
changelog: #2484
under Unreleased