Sourced from i18next-cli's changelog.
1.80.4
- fix(rename-key): calls with a string default value are renamed in the source.
t('key', 'Default')andt('key', 'Default', { … })were left untouched while the translation files were renamed, so the nextextractbrought the old key back. Moving such a key to another namespace keeps the default value:t('key', 'Default', { ns: 'ns2' }).- fix(extract): plural forms of a key stored flat stay flat in secondary locales. With
"Loading..._one"inru/translation.json,extractalso wrote a nested copy,{ "Loading": { "": { "": { "_one": … } } } }; the same happened for generated forms (_few,_many), preserved_zeroforms, context variants andpreservePatterns. A file that already has these nested copies loses them on the nextextract.1.80.3
- fix(rename-key): keys the extractor stores flat are renamed in the translation files. Renaming
"Loading..."to"Saving..."left the old key in place and wrote{ "Saving": { "": { "": { "": "Loading..." } } } }; renamingcommon.okto"Okay, thanks."wrote{ "Okay, thanks": { "": "OK" } }. The new key is now written where the nextextractputs it (flat for"Loading...", natural-language and<Trans>keys), and the old key is removed however the file stores it. #3111.80.2
- fix(sync): flat keys that contain the key separator keep their translations. The extractor writes keys like
"Loading..."or"Hello world. Bye"as one flat key, butsyncsplit them on the separator, so a secondary file with{ "Loading...": "Lädt..." }became{ "Loading": { "": { "": { "": "" } } } }and the translation was lost.syncnow writes them flat, andstatus,localizeandrename-keyfind their values too. A secondary file already broken this way gets its flat key back (with an empty value) on the nextsync. #310- fix(types): placeholders with spaces on one side only (
{{ name}}) are trimmed, andenableSelectorno longer throws on plural keys whose base name isconstructor,toString, … or also an object (i18next-resources-for-ts 2.1.2).
be52852
1.80.4c77cae2
fix(rename-key, extract): rename calls with a default value, keep plural
form...a8830f9
1.80.363d076f
docs: changelog for 1.80.3, fix flat-key example in comments43d27c0
fix(rename-key): rename keys the extractor stores flat (#311)7e74173
1.80.28cbed12
chore(deps): i18next-resources-for-ts 2.1.2, changelog108a745
fix(sync): keep flat keys that contain the key separator (#310)