Sourced from i18next-cli's changelog.
1.95.7
- fix(rename-key): the context forms are also found when
extract.inputhas backslashes (aspath.joinwrites it on Windows), like the source filesrename-keychanges. Before, such a pattern found no context forms. Follow-up to #3491.95.6
- fix(rename-key): the context forms the code uses with a key are renamed with it:
friend_maleandfriend_male_onefort('friend', { context: 'male' }), every value of a dynamic context (isMale ? 'male' : 'female') and the context of a<Trans>. A key that only starts the same way (friend_list) stays, and the conflict check sees the context forms of the new key. Before, only the source was renamed and the nextextractdropped the translations. Plugins see the key a context variant came from ascontextBaseKeyinonKeySubmitted(#349)1.95.5
- fix(rename-key): without
extract.outputFormat, translation files keep the format of their path, as withextractandsync. A.tsfile was rewritten as plain JSON (no longer a module, so the nextextractcould not read it and dropped its values) and a.yamlfile as JSON. Thanks@mokshupadhyay(#344, #351)- fix(rename-key): plural forms nested under the key path (
{ "cart": { "item_one" } }forcart.item, asextractwrites them by default), forms with a custompluralSeparatorand ordinal forms (place_ordinal_one) are renamed too, also in{ ns }calls, and the conflict check sees them. Before, only the source was renamed and the translations stayed under the old key, so the nextextractdropped them. Thanks@mokshupadhyay(#345, #352)- fix(rename-key): a rename inside a namespace keeps
nsin a call with other options:t('title', { ns: 'common', defaultValue: 'Title' })lost itsnsand looked the key up in the default namespace (#347)- fix(rename-key): moving a key out of the default namespace (or into it) also changes the calls when
defaultNSis not set. The translation was moved, but every call stayed as it was, although the command reported a source change (#348)- fix(extract): under a
keyPrefix, plural forms get the key as written in the call as default (items_one: "items"), like other keys, instead of the key with the prefix ("cart.items"). Existing values are kept (#350)- fix(init, status, lint): with
en-*locale folders and no plainen(e.g.de-DE,en-US,fr-FR), the detected config takes theen-*locale as the primary language instead of the first one in alphabetical order, soinit --yesno longer writesde-DEas the primary. Thanks@mokshupadhyay(#346, #353)
eca7dca
1.95.7064b447
changelog for 1.95.7233f77f
changelog: Windows input patterns for #349
under Unreleasedd634a52
fix(rename-key): find the context forms with backslashes in
extract.input, as...62352c2
1.95.65de77a5
changelog for 1.95.6d16e2f2
changelog: #349
under Unreleasedf71edfb
fix(rename-key): rename the context forms the code uses with a key (#349)44db9a0
1.95.594ebea0
changelog for 1.95.5