Sourced from i18next's releases.
v27.1.1
- perf:
t()skips the interpolation and nesting regexp scans when the text has no interpolation or nesting prefix, about 6-14% faster for short texts and up to 75% for long ones. The output does not change. Thanks@g4lb(#2469)v27.1.0
- feat: when the plural form selected for
countis missing,t()uses the_otherform of the same language before the next fallback language, as CLDR does (lateral inheritance), instead of returning the key. Current CLDR data gives French, Spanish, Italian and Portuguese amanyform for exact millions, so files with only_oneand_othershowed the key (or the fallback language) forcount: 1000000. The plain key still comes first, sokey+key_otherkeeps resolvingkey; with a context,key_<context>_othercomes beforekey_other; ordinals use_ordinal_other; anddefaultValue_otheris used afterdefaultValue. A form filled in from_otheris no longer reported as missing (saveMissing,missingKeyHandler,exists()). Thanks@TenPotatoes(#2468)v27.0.1
- fix: each cached format keeps at most 1000 formatters, dropping the oldest when full. This covers the built-in formats (number, currency, datetime, relativetime, list) with the default
cacheInBuiltFormats: true, and formats added withaddCached. The cache key holds allt()options, including the interpolated values, so every new amount, date or name added a formatter that was never released: about 50 MB per 100k values, growing without end in a long-running server. A dropped formatter is made again from the same language and options, so the output does not change. Thanks@liustack(#2467).
Sourced from i18next's changelog.
27.1.1
- perf:
t()skips the interpolation and nesting regexp scans when the text has no interpolation or nesting prefix, about 6-14% faster for short texts and up to 75% for long ones. The output does not change. Thanks@g4lb(#2469)27.1.0
- feat: when the plural form selected for
countis missing,t()uses the_otherform of the same language before the next fallback language, as CLDR does (lateral inheritance), instead of returning the key. Current CLDR data gives French, Spanish, Italian and Portuguese amanyform for exact millions, so files with only_oneand_othershowed the key (or the fallback language) forcount: 1000000. The plain key still comes first, sokey+key_otherkeeps resolvingkey; with a context,key_<context>_othercomes beforekey_other; ordinals use_ordinal_other; anddefaultValue_otheris used afterdefaultValue. A form filled in from_otheris no longer reported as missing (saveMissing,missingKeyHandler,exists()). Thanks@TenPotatoes(#2468)27.0.1
- fix: each cached format keeps at most 1000 formatters, dropping the oldest when full. This covers the built-in formats (number, currency, datetime, relativetime, list) with the default
cacheInBuiltFormats: true, and formats added withaddCached. The cache key holds allt()options, including the interpolated values, so every new amount, date or name added a formatter that was never released: about 50 MB per 100k values, growing without end in a long-running server. A dropped formatter is made again from the same language and options, so the output does not change. Thanks@liustack(#2467).
523cb61
27.1.15097510
changelog for 27.1.15f453fe
perf: skip the interpolation and nesting regexp scans for a text without
thei...8547690
27.1.056e4aa0
changelog for 27.1.073f6f26
feat: a missing plural form falls back to the _other form of the same
language1cb5a7a
27.0.17f7216b
changelog for 27.0.135fecdd
fix: keep at most 1000 formatters in each cached format (#2467)