chore(deps): update dependency react-i18next to v17#3526
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency react-i18next to v17#3526renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
32f7081 to
77e1a47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
16.5.6→17.0.1Release Notes
i18next/react-i18next (react-i18next)
v17.0.1Compare Source
>= 26.0.1(forgot to do it in last version)interpolation.formattoi18n.services.formatter.add()(i18next v26)v17.0.0Compare Source
Potentially breaking changes
transKeepBasicHtmlNodesFornow correctly preserves HTML tag names when children contain interpolations or mixed content 230<strong>{{name}}</strong>was incorrectly serialized as<1>{{name}}</1>— the tag name was only preserved for plain string childreni18nKeyis provided)Other changes
16.6.6
>= 25.10.9to match required type exports (ConstrainTarget,ApplyTarget,GetSource) used byTransSelector191116.6.5
useTranslationno longer matches whenkeyPrefixis absent, fixingdefaultNS: falsewith explicitnsoption 241216.6.4
16.6.3
TransSelectoroverloads into a single signature sotypeof Transremains extendable 190916.6.2
useTranslationnow accepts selector functions askeyPrefixwith full type-safe key narrowing whenenableSelectoris enabled 236716.6.1
<Trans i18nKey={sk} />to accept aSelectorKey236416.6.0
tis called beforereadywithuseSuspense: false1896valuesprop on<Trans />component — interpolation variables are now inferred from the translation string when custom types are configured 177216.5.8
16.5.7
<Trans>component withenableSelector: truedoes not support multiple selectors for fallbacks 190716.5.6
useSSRwheninit()hasn't been called beforeuseSSR— now logs a warning instead of throwing 160416.5.5
useSSR,getInitialPropsandTranslationwhen no i18next instance is available (e.g. in monorepo setups with duplicatereact-i18nextcopies) — now logs a clear warning instead of throwing 160416.5.4
16.5.3
16.5.2
16.5.1
nodesToString(runtime + TypeScript typings) to supporti18next-cli(i18next/i18next-cli#155)16.5.0
transDefaultPropsto set default props for the Trans component (e.g.tOptions,shouldUnescape,values) 189516.4.1
&quot;/&#​39;. 189316.4.0
<Trans count>prop: optional - infer count from children 189116.3.5
16.3.4
<Trans>1887, by still trying to fix element.ref access issue with react 19 184616.3.3
16.3.2
16.3.1
16.3.0
16.2.4
16.2.3
16.2.2
16.2.1
16.2.0
16.1.6
16.1.5
16.1.4
16.1.3
16.1.2
16.1.1
IcuTranscomponent 187316.1.0
IcuTranscomponent 186916.0.1
16.0.0
15.7.4
15.7.3
15.7.2
15.7.1
15.7.0
15.6.1
avoid exception when passing bindI18n: false 1856
15.6.0
fix: passing components as object should still allow for indexed matching of children 1854
15.5.3
chore: update
@babel/runtime185115.5.2
fix element.ref access issue with react 19 1846
15.5.1
add typescript as optional peer dependency 1843
15.5.0
feat: use const type parameters for useTranslation() 1842
15.4.1
fix: unique key warning on componentized element 1835
15.4.0
feat: add meta with codes on warnings to allow conditional logging 1826
15.3.0
Uses the i18next logger instead of the default console logger, if there is a valid i18next instance. Now the debug i18next option is respected, and you can also inject your own logger module: https://www.i18next.com/misc/creating-own-plugins#logger
15.2.0
This version may be breaking if you still use React < v18 with TypeScript.
For JS users this version is equal to v15.1.4
15.1.4
15.1.3
15.1.2
15.1.1
15.1.0
<Trans />warns 'Each child in a list should have a unique "key" prop.' for react 19 180615.0.3
15.0.2
15.0.1
15.0.0
14.1.3
14.1.2
14.1.1
14.1.0
Trans): add typechecking on context prop 1732 (might break if using "internal"TransorTransProps)14.0.8
14.0.7
14.0.6
14.0.5
14.0.4
14.0.3
14.0.2
14.0.1
CustomInstanceExtensions171314.0.0
13.5.0
13.4.1
13.4.0
13.3.2
13.3.1
13.3.0
13.2.2
13.2.1
13.2.0
13.1.2
13.1.1
13.1.0
13.0.3
13.0.2
13.0.1
13.0.0
12.3.1
12.3.0
12.2.2
12.2.1
12.2.0
12.1.5
12.1.4
12.1.3
12.1.2
12.1.1
12.1.0
12.0.0
11.18.6
11.18.5
11.18.4
11.18.3
11.18.2
11.18.1
11.18.0
11.17.4
11.17.3
11.17.2
11.17.1
11.17.0
11.16.11
11.16.10
11.16.9
11.16.8
11.16.7
11.16.6
11.16.5
11.16.4
11.16.3
11.16.2
11.16.1
11.16.0
11.15.7
11.15.6
11.15.5
11.15.4
11.15.3
11.15.2
11.15.1
11.15.0
11.14.3
11.14.2
11.14.1
11.14.0
11.13.0
11.12.0
11.11.4
11.11.3
11.11.2
11.11.1
11.11.0
CustomTypeOptionstype definition and deprecate theResourcestype definition 132811.10.0
11.9.0
11.8.15
11.8.14
11.8.13
11.8.12
11.8.11
11.8.10
11.8.9
11.8.8
TFuncKeyto be used without specifying the namespace, in the same way TFunction and useTranslation work 126211.8.7
11.8.6
11.8.5
11.8.4
11.8.3
11.8.2
11.8.1
11.8.0
11.7.4
11.7.3
11.7.2
11.7.1
11.7.0
11.6.0
11.5.1
11.5.0
11.4.0
11.3.5
11.3.4
tfunction if the component is unmounted. (1051)[#1051]11.3.3
11.3.2
11.3.1
11.3.0
11.2.7
parenttype 102111.2.6
parentprop type 101911.2.5
11.2.4
11.2.3
11.2.2
11.2.1
11.2.0
11.1.0
rollup.config.jsfor IE11 Transpilations 98811.0.1
11.0.0
tbound to the previous language untillanguageChangedget triggered -> this results in a nicer experience for users (no flickering Suspense while changing the language). Based on issue "Suspence is fired during lang change when useTranslation called in between" 975languageChangedandlanguageChangingwas removed from that defaultlanguageChangingto bindI18n will bring back old behaviour where a language change will trigger a Suspense / ready: false while loading those new translationsbindI18n,bindI18nStoreanduseSuspensein the hook byuseTranslation(ns, { bindI18n, bindI18nStore, useSuspense})or in the HOC by passing those as props.10.13.2
10.13.1
10.13.0
valuesobject passed to Trans if passed - else use the one on props 94710.12.5
10.12.4
10.12.3
10.12.2
10.12.1
10.12.0
10.11.5
10.11.4
10.11.3
10.11.2
10.11.1
10.11.0
10.10.0
10.9.1
10.9.0
10.8.1
10.8.0
10.7.0
10.6.2
10.6.1
10.6.0
10.5.3
10.5.2
10.5.1
10.5.0
<ul>{['a', 'b'].map(item => ( <li key={item}>{item}</li> ))}</ul>784 (Adding<ul i18nIsDynamicList>will also create correct missing string)10.4.2
10.4.1
10.4.0
10.3.1
10.3.0
10.2.1
10.2.0
10.1.2
10.1.1
10.1.0
10.0.5
10.0.4
10.0.3
10.0.2
10.0.1
const { t } = useTranslation()71410.0.0
10.0.0-alpha.3
10.0.0-alpha.2
10.0.0-alpha.1
9.0.10
9.0.9
9.0.8
9.0.7
9.0.6
9.0.5
9.0.4
9.0.3
9.0.2
9.0.1
9.0.0
transEmptyNodeValuein i18next.options.react to set a default fallback value for empty nodes to allow i18next fallback flow 462BREAKING
Using react >= 16.3.0 will be save - in other cases you will need to polyfill react.createContext yourself!!
8.4.0
8.3.9
8.3.8
8.3.7
8.3.6
8.3.5
8.3.4
8.3.3
8.3.2
8.3.1
8.3.0
8.2.0
8.1.2
8.1.1
8.1.0
8.0.8
8.0.7
8.0.6
8.0.5
8.0.4
8.0.3
8.0.2
8.0.1
8.0.0
translate HOC was renamed to "withNamespaces" as it controls which namespaces should be loaded
I18n render prop was renamed to "NamespacesConsumer" as it controls which namespaces should be "consumed"
there is a new context.consuming HOC "withI18n" adds i18n, t to component props (without the extra options of withNamespaces)
there is a simplification for interpolation in translations
'Hello <1><0>{{name}}</0></1>, you have <3>{{count}}</3> message. Open <5>hear</5>.'can be written as:
'Hello <1>{{name}}</1>, you have {{count}} message. Open <5>hear</5>.'=> there is no need to add
<0>...</0>around interpolated values anylonger=> your old files having those extra pseudo tags will still work without needing to change them
Using react's new context api
should be non breaking in most cases, with following exceptions:
still we prefer to increase this to a major version as beside the described egde cases there might be other effects we not have covered with our tests
7.13.0
7.12.0
7.11.1
7.11.0
7.10.1
7.10.0
react-i18next/icu.macroa babel macro to allow nicer components used with ICU format (which as default would result in invalid JSX). discussion7.9.1
7.9.0
7.8.1
7.8.0
7.7.0
7.6.1
7.6.0
7.5.1
7.5.0
7.4.0
nson Trans component to override namespace passed by render prop or hoc7.3.6
7.3.5
7.3.4
7.3.3
7.3.2
7.3.1
7.3.0
7.2.0
7.1.1
7.1.0
7.0.2
7.0.1
7.0.0
Starting with v7.0.0 Trans component per default won't add a parent div around content passed as children. It will just return it's children.
You still got the option to set a parent if you prefer content being wrapped.
If you prefer wrapping for all your Trans components (or for backwards compatibility) you can set option
react.defaultTransParentto an element on i18next init.6.2.0
6.1.0
nullrender PR3366.0.6
6.0.5
6.0.4
6.0.3
6.0.2
6.0.1
6.0.0
5.4.1
5.4.0
5.3.0
5.2.0
5.1.0
5.0.0
{ wait: true }-> all overrides for the translate hoc now have to be in childreactlike{ react: { wait: true } }translateFuncNameas we need that upfront to define childContextTypes)translateFuncName) by using:4.8.0
4.7.0
4.6.4
4.6.3
4.6.2
4.6.1
4.6.0
4.5.0
4.4.0
4.3.0
Configuration
📅 Schedule: Branch creation - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
This PR contains the following updates:
16.5.6→17.0.1Release Notes
i18next/react-i18next (react-i18next)
v17.0.1Compare Source
>= 26.0.1(forgot to do it in last version)interpolation.formattoi18n.services.formatter.add()(i18next v26)v17.0.0Compare Source
Potentially breaking changes
transKeepBasicHtmlNodesFornow correctly preserves HTML tag names when children contain interpolations or mixed content 230<strong>{{name}}</strong>was incorrectly serialized as<1>{{name}}</1>— the tag name was only preserved for plain string childreni18nKeyis provided)Other changes
16.6.6
>= 25.10.9to match required type exports (ConstrainTarget,ApplyTarget,GetSource) used byTransSelector191116.6.5
useTranslationno longer matches whenkeyPrefixis absent, fixingdefaultNS: falsewith explicitnsoption 241216.6.4
16.6.3
TransSelectoroverloads into a single signature sotypeof Transremains extendable 190916.6.2
useTranslationnow accepts selector functions askeyPrefixwith full type-safe key narrowing whenenableSelectoris enabled 236716.6.1
<Trans i18nKey={sk} />to accept aSelectorKey236416.6.0
tis called beforereadywithuseSuspense: false1896valuesprop on<Trans />component — interpolation variables are now inferred from the translation string when custom types are configured 177216.5.8
16.5.7
<Trans>component withenableSelector: truedoes not support multiple selectors for fallbacks 190716.5.6
useSSRwheninit()hasn't been called beforeuseSSR— now logs a warning instead of throwing 160416.5.5
useSSR,getInitialPropsandTranslationwhen no i18next instance is available (e.g. in monorepo setups with duplicatereact-i18nextcopies) — now logs a clear warning instead of throwing 160416.5.4
16.5.3
16.5.2
16.5.1
nodesToString(runtime + TypeScript typings) to supporti18next-cli(i18next/i18next-cli#155)16.5.0
transDefaultPropsto set default props for the Trans component (e.g.tOptions,shouldUnescape,values) 189516.4.1
"/'. 189316.4.0
<Trans count>prop: optional - infer count from children 189116.3.5
16.3.4
<Trans>1887, by still trying to fix element.ref access issue with react 19 184616.3.3
16.3.2
16.3.1
16.3.0
16.2.4
16.2.3
16.2.2
16.2.1
16.2.0
16.1.6
16.1.5
16.1.4
16.1.3
16.1.2
16.1.1
IcuTranscomponent 187316.1.0
IcuTranscomponent 186916.0.1
16.0.0
15.7.4
15.7.3
15.7.2
15.7.1
15.7.0
15.6.1
avoid exception when passing bindI18n: false 1856
15.6.0
fix: passing components as object should still allow for indexed matching of children 1854
15.5.3
chore: update
@babel/runtime185115.5.2
fix element.ref access issue with react 19 1846
15.5.1
add typescript as optional peer dependency 1843
15.5.0
feat: use const type parameters for useTranslation() 1842
15.4.1
fix: unique key warning on componentized element 1835
15.4.0
feat: add meta with codes on warnings to allow conditional logging 1826
15.3.0
Uses the i18next logger instead of the default console logger, if there is a valid i18next instance. Now the debug i18next option is respected, and you can also inject your own logger module: https://www.i18next.com/misc/creating-own-plugins#logger
15.2.0
This version may be breaking if you still use React < v18 with TypeScript.
For JS users this version is equal to v15.1.4
15.1.4
15.1.3
15.1.2
15.1.1
15.1.0
<Trans />warns 'Each child in a list should have a unique "key" prop.' for react 19 180615.0.3
15.0.2
15.0.1
15.0.0
14.1.3
14.1.2
14.1.1
14.1.0
Trans): add typechecking on context prop 1732 (might break if using "internal"TransorTransProps)14.0.8
14.0.7
14.0.6
14.0.5
14.0.4
14.0.3
14.0.2
14.0.1
CustomInstanceExtensions171314.0.0
13.5.0
13.4.1
13.4.0
13.3.2
13.3.1
13.3.0
13.2.2
13.2.1
13.2.0
13.1.2
13.1.1
13.1.0
13.0.3
13.0.2
13.0.1
13.0.0
12.3.1
12.3.0
12.2.2
12.2.1
12.2.0
12.1.5
12.1.4
12.1.3
12.1.2
12.1.1
12.1.0
12.0.0
11.18.6
11.18.5
11.18.4
11.18.3
11.18.2
11.18.1
11.18.0
11.17.4
11.17.3
11.17.2
11.17.1
11.17.0
11.16.11
11.16.10
11.16.9
11.16.8
11.16.7
11.16.6
11.16.5
11.16.4
11.16.3
11.16.2
11.16.1
11.16.0
11.15.7
11.15.6
11.15.5
11.15.4
11.15.3
11.15.2
11.15.1
11.15.0
11.14.3
11.14.2
11.14.1
11.14.0
11.13.0
11.12.0
11.11.4
11.11.3
11.11.2
11.11.1
11.11.0
CustomTypeOptionstype definition and deprecate theResourcestype definition 132811.10.0
11.9.0
11.8.15
11.8.14
11.8.13
11.8.12
11.8.11
11.8.10
11.8.9
11.8.8
TFuncKeyto be used without specifying the namespace, in the same way TFunction and useTranslation work 126211.8.7
11.8.6
11.8.5
11.8.4
11.8.3
11.8.2
11.8.1
11.8.0
11.7.4
11.7.3
11.7.2
11.7.1
11.7.0
11.6.0
11.5.1
11.5.0
11.4.0
11.3.5
11.3.4
tfunction if the component is unmounted. (1051)[#1051]11.3.3
11.3.2
11.3.1
11.3.0
11.2.7
parenttype 102111.2.6
parentprop type 101911.2.5
11.2.4
11.2.3
11.2.2
11.2.1
11.2.0
11.1.0
rollup.config.jsfor IE11 Transpilations 98811.0.1
11.0.0
tbound to the previous language untillanguageChangedget triggered -> this results in a nicer experience for users (no flickering Suspense while changing the language). Based on issue "Suspence is fired during lang change when useTranslation called in between" 975languageChangedandlanguageChangingwas removed from that defaultlanguageChangingto bindI18n will bring back old behaviour where a language change will trigger a Suspense / ready: false while loading those new translationsbindI18n,bindI18nStoreanduseSuspensein the hook byuseTranslation(ns, { bindI18n, bindI18nStore, useSuspense})or in the HOC by passing those as props.10.13.2
10.13.1
10.13.0
valuesobject passed to Trans if passed - else use the one on props 94710.12.5
10.12.4
10.12.3
10.12.2
10.12.1
10.12.0
10.11.5
10.11.4
10.11.3
10.11.2
10.11.1
10.11.0
10.10.0
10.9.1
10.9.0
10.8.1
10.8.0
10.7.0
10.6.2
10.6.1
10.6.0
10.5.3
10.5.2
10.5.1
10.5.0
<ul>{['a', 'b'].map(item => ( <li key={item}>{item}</li> ))}</ul>784 (Adding<ul i18nIsDynamicList>will also create correct missing string)10.4.2
10.4.1
10.4.0
10.3.1
10.3.0
10.2.1
10.2.0
10.1.2
10.1.1
10.1.0
10.0.5
10.0.4
10.0.3
10.0.2
10.0.1
const { t } = useTranslation()71410.0.0
10.0.0-alpha.3
10.0.0-alpha.2
10.0.0-alpha.1
9.0.10
9.0.9
9.0.8
9.0.7
9.0.6
9.0.5
9.0.4
9.0.3
9.0.2
9.0.1
9.0.0
transEmptyNodeValuein i18next.options.react to set a default fallback value for empty nodes to allow i18next fallback flow 462BREAKING
Using react >= 16.3.0 will be save - in other cases you will need to polyfill react.createContext yourself!!
8.4.0
8.3.9
8.3.8
8.3.7
8.3.6
8.3.5
8.3.4
8.3.3
8.3.2
8.3.1
8.3.0
8.2.0
8.1.2
8.1.1
8.1.0
8.0.8
8.0.7
8.0.6
8.0.5
8.0.4
8.0.3
8.0.2
8.0.1
8.0.0
translate HOC was renamed to "withNamespaces" as it controls which namespaces should be loaded
I18n render prop was renamed to "NamespacesConsumer" as it controls which namespaces should be "consumed"
there is a new context.consuming HOC "withI18n" adds i18n, t to component props (without the extra options of withNamespaces)
there is a simplification for interpolation in translations
'Hello <1><0>{{name}}</0></1>, you have <3>{{count}}</3> message. Open <5>hear</5>.'can be written as:
'Hello <1>{{name}}</1>, you have {{count}} message. Open <5>hear</5>.'=> there is no need to add
<0>...</0>around interpolated values anylonger=> your old files having those extra pseudo tags will still work without needing to change them
Using react's new context api
should be non breaking in most cases, with following exceptions:
still we prefer to increase this to a major version as beside the described egde cases there might be other effects we not have covered with our tests
7.13.0
7.12.0
7.11.1
7.11.0
7.10.1
7.10.0
react-i18next/icu.macroa babel macro to allow nicer components used with ICU format (which as default would result in invalid JSX). discussion7.9.1
7.9.0
7.8.1
7.8.0
7.7.0
7.6.1
7.6.0
7.5.1
7.5.0
7.4.0
nson Trans component to override namespace passed by render prop or hoc7.3.6
7.3.5
7.3.4
7.3.3
7.3.2
7.3.1
7.3.0
7.2.0
7.1.1
7.1.0
7.0.2
7.0.1
7.0.0
Starting with v7.0.0 Trans component per default won't add a parent div around content passed as children. It will just return it's children.
You still got the option to set a parent if you prefer content being wrapped.
If you prefer wrapping for all your Trans components (or for backwards compatibility) you can set option
react.defaultTransParentto an element on i18next init.6.2.0
6.1.0
nullrender PR3366.0.6
6.0.5
6.0.4
6.0.3
6.0.2
6.0.1
6.0.0
5.4.1
5.4.0
5.3.0
5.2.0
5.1.0
5.0.0
{ wait: true }-> all overrides for the translate hoc now have to be in childreactlike{ react: { wait: true } }translateFuncNameas we need that upfront to define childContextTypes)translateFuncName) by using:4.8.0
4.7.0
4.6.4
4.6.3
4.6.2
4.6.1
4.6.0
4.5.0
4.4.0
4.3.0
Configuration
📅 Schedule: Branch creation - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.