react-i18next 16.1.3 → 16.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 16.1.4
2
+
3
+ - fix: detect pre-transformation use of interpolation like number/date/etc. [1875](https://github.com/i18next/react-i18next/pull/1875)
4
+
1
5
  ### 16.1.3
2
6
 
3
7
  - fix: ensure invalid identifiers are quoted in the props object [1874](https://github.com/i18next/react-i18next/pull/1874)
@@ -1 +1 @@
1
- {"type":"module","version":"16.1.3"}
1
+ {"type":"module","version":"16.1.4"}
package/icu.macro.js CHANGED
@@ -86,9 +86,12 @@ function ICUMacro({ references, state, babel }) {
86
86
  const elementName = openingElement.name;
87
87
  const isMemberExpression = babel.types.isJSXMemberExpression(elementName);
88
88
 
89
- if (!isMemberExpression && elementName.name === 'IcuTrans') {
89
+ if (
90
+ !isMemberExpression &&
91
+ (elementName.name === 'IcuTrans' || elementName.name === 'Trans')
92
+ ) {
90
93
  // this is a valid use of number/date/time/etc.
91
- // Only check IcuTrans since Trans transformation (lines 57-71) happens before this validation
94
+ // Check for both IcuTrans (after transformation) and Trans (during transformation)
92
95
  return;
93
96
  }
94
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-i18next",
3
- "version": "16.1.3",
3
+ "version": "16.1.4",
4
4
  "description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "types": "./index.d.mts",