react-i18next 17.0.7 → 17.0.8
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 +4 -0
- package/README.md +4 -0
- package/TransWithoutContext.d.ts +3 -1
- package/dist/es/package.json +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 17.0.8
|
|
2
|
+
|
|
3
|
+
- fix(types): `<Trans i18nKey={$ => ...}>` now typechecks under `enableSelector: 'strict'`. The `Trans` component's conditional type was gated on `_EnableSelector extends true | 'optimize'`, excluding `'strict'` and falling back to the legacy string-key signature. Runtime was already correct (it calls `keyFromSelector(i18nKey)` whenever `typeof i18nKey === 'function'`); this is a type-only fix that widens the conditional to include `'strict'`. Thanks @Faithfinder ([#1921](https://github.com/i18next/react-i18next/pull/1921))
|
|
4
|
+
|
|
1
5
|
## 17.0.7
|
|
2
6
|
|
|
3
7
|
- feat: `useTranslation([nsA, nsB, ...])` now passes its full namespace list to `getFixedT` via the new `scopeNs` opt (requires `i18next` ≥ v26.0.10). This makes selector calls with a secondary-namespace prefix resolve correctly under default `nsMode`: `t($ => $.nsB.foo)` previously missed silently because the bound `ns` was the primary string only and i18next's selector rewrite needed an array. Resolution semantics are unchanged — plain `t('key')` lookups still stay isolated to the primary namespace by default; use `nsMode: 'fallback'` to opt into multi-ns fallback resolution as before. Fixes [i18next#2429](https://github.com/i18next/i18next/issues/2429) for `useTranslation`-based callers.
|
package/README.md
CHANGED
|
@@ -29,6 +29,10 @@ $ v9.0.10 (legacy)
|
|
|
29
29
|
npm i react-i18next@legacy
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
### Advice:
|
|
33
|
+
|
|
34
|
+
If you don't like to manage your translation files manually or are simply looking for a [better management solution](https://www.locize.com?utm_source=react_i18next_readme&utm_medium=github&utm_campaign=readme), take a look at [i18next-locize-backend](https://github.com/locize/i18next-locize-backend). The i18next [backend plugin](https://www.i18next.com/overview/plugins-and-utils#backends) for 🌐 [Locize](https://www.locize.com?utm_source=react_i18next_readme&utm_medium=github&utm_campaign=readme) ☁️ — built by the same team behind react-i18next, with CDN delivery, AI translation, and no redeploys for copy changes.
|
|
35
|
+
|
|
32
36
|
### Documentation
|
|
33
37
|
|
|
34
38
|
The documentation is published on [react.i18next.com](https://react.i18next.com) and PR changes can be supplied [here](https://github.com/i18next/react-i18next-gitbook).
|
package/TransWithoutContext.d.ts
CHANGED
|
@@ -106,7 +106,9 @@ export interface TransSelector {
|
|
|
106
106
|
): React.ReactElement;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
export const Trans: _EnableSelector extends true | 'optimize'
|
|
109
|
+
export const Trans: _EnableSelector extends true | 'optimize' | 'strict'
|
|
110
|
+
? TransSelector
|
|
111
|
+
: TransLegacy;
|
|
110
112
|
|
|
111
113
|
export function nodesToString(
|
|
112
114
|
children: React.ReactNode,
|
package/dist/es/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"17.0.
|
|
1
|
+
{"type":"module","version":"17.0.8"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-i18next",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.8",
|
|
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",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"use-sync-external-store": "^1.6.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"i18next": ">= 26.0
|
|
75
|
+
"i18next": ">= 26.2.0",
|
|
76
76
|
"react": ">= 16.8.0",
|
|
77
77
|
"typescript": "^5 || ^6"
|
|
78
78
|
},
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"eslint-plugin-testing-library": "^6.5.0",
|
|
128
128
|
"happy-dom": "^20.8.9",
|
|
129
129
|
"husky": "^9.1.7",
|
|
130
|
-
"i18next": "^26.0
|
|
130
|
+
"i18next": "^26.2.0",
|
|
131
131
|
"lint-staged": "^16.4.0",
|
|
132
132
|
"mkdirp": "^3.0.1",
|
|
133
133
|
"prettier": "^3.8.1",
|