You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result should be: "number: (formatted 5) name: (formatted Ben)"
but the actual result is: "number: (formatted 5) name: (formatted undefined)":
Your Environment
runtime version: Safari and Chrome
i18next version: i.e. 23.15.1
os: Mac
I can reproduce in ^14.0.0 and 15.0.1, but not in ^13.0.0 (see stackblitz above).
We use react-i18next in a very large monorepo, so it would be difficult to find all instances of this issue to apply the simple workaround mentioned above.
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
When
alwaysFormat
is set to true, and you useTrans
with anycount
orvalues
, the interpolated value of objects is undefined.For example, this causes "value: undefined":
but this works as expected:
A workaround is to interpolate the value itself instead of an object:
To Reproduce
stackblitz with issue (
react-i18next: 15.0.1
)stackblitz working as expected (
react-i18next: ^13.0.0
)Expected behavior
The result should be: "number: (formatted 5) name: (formatted Ben)"
but the actual result is: "number: (formatted 5) name: (formatted undefined)":
Your Environment
I can reproduce in ^14.0.0 and 15.0.1, but not in ^13.0.0 (see stackblitz above).
We use react-i18next in a very large monorepo, so it would be difficult to find all instances of this issue to apply the simple workaround mentioned above.
The text was updated successfully, but these errors were encountered: