react-i18next 17.0.12 → 17.0.13

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
+ ## 17.0.13
2
+
3
+ - fix(types): the selector-form `keyPrefix` overload of `useTranslation()` is now available under `enableSelector: 'strict'`. `useTranslation` was gated on `true | 'optimize'` only, so under `'strict'` it resolved to the legacy signature and the selector overload disappeared entirely (`keyPrefix: ($) => $.ns.foo` failed with `Type '($: any) => any' is not assignable to type 'undefined'`). `Trans` already handled all three modes. Companion to the same fix for `getFixedT` in [i18next#2446](https://github.com/i18next/i18next/pull/2446). Thanks @hovelopin ([#1930](https://github.com/i18next/react-i18next/pull/1930)).
4
+
1
5
  ## 17.0.12
2
6
 
3
7
  - fix(IcuTrans): key-less `icu.macro` nodes (`<Trans>Welcome, {name}!</Trans>`, `<Select>`, `<Plural>` without `i18nKey`) rendered an empty string since 17.0.0. The macro now emits `<IcuTrans defaultTranslation="…">` without a key and `IcuTrans` passed `undefined` to `t()`, which returns `''`. Like `Trans`, `IcuTrans` now uses `defaultTranslation` as the key when `i18nKey` is not provided.
@@ -1 +1 @@
1
- {"type":"module","version":"17.0.12"}
1
+ {"type":"module","version":"17.0.13"}
package/index.d.ts CHANGED
@@ -222,7 +222,7 @@ export type FallbackNs<Ns> = Ns extends undefined
222
222
  ? Ns
223
223
  : _DefaultNamespace;
224
224
 
225
- export const useTranslation: _EnableSelector extends true | 'optimize'
225
+ export const useTranslation: _EnableSelector extends true | 'optimize' | 'strict'
226
226
  ? UseTranslationSelector
227
227
  : UseTranslationLegacy;
228
228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-i18next",
3
- "version": "17.0.12",
3
+ "version": "17.0.13",
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",