react-i18next
Advanced tools
Comparing version 11.16.7 to 11.16.8
@@ -0,1 +1,5 @@ | ||
### 11.16.8 | ||
- types: fix Trans component to support react 18 types, by introducing allowObjectInHTMLChildren TS option [1492](https://github.com/i18next/react-i18next/pull/1492) | ||
### 11.16.7 | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "react-i18next", | ||
"version": "11.16.7", | ||
"version": "11.16.8", | ||
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/index.js", |
@@ -78,3 +78,3 @@ # react-i18next [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Awesome%20react-i18next%20for%20react.js%20based%20on%20i18next%20internationalization%20ecosystem%20&url=https://github.com/i18next/react-i18next&via=jamuhl&hashtags=i18n,reactjs,js,dev) | ||
- **Simplicity:** no need to change your webpack configuration or add additional babel transpilers, just use create-react-app and go. | ||
- **Production ready** we know there are more needs for production than just doing i18n on the clientside, so we offer wider support on [serverside](https://www.i18next.com/supported-frameworks.html) too (nodejs, php, ruby, .net, ...). **Learn once - translate everywhere**. | ||
- **Production ready** we know there are more needs for production than just doing i18n on the clientside, so we offer wider support on [serverside](https://www.i18next.com/overview/supported-frameworks) too (nodejs, php, ruby, .net, ...). **Learn once - translate everywhere**. | ||
- **Beyond i18n** comes with [locize](https://locize.com) bridging the gap between developement and translations - covering the whole translation process. | ||
@@ -81,0 +81,0 @@ |
@@ -43,2 +43,3 @@ import i18next, { | ||
* jsonFormat: 'v4'; | ||
* allowObjectInHTMLChildren: false; | ||
* resources: { | ||
@@ -66,2 +67,3 @@ * custom: { | ||
resources: Resources; | ||
allowObjectInHTMLChildren: false; | ||
}, | ||
@@ -102,2 +104,11 @@ CustomTypeOptions | ||
type ObjectOrNever = TypeOptions['allowObjectInHTMLChildren'] extends true | ||
? Record<string, unknown> | ||
: never; | ||
declare module 'react' { | ||
interface HTMLAttributes { | ||
children?: ReactNode | ObjectOrNever; | ||
} | ||
} | ||
type PluralSuffix = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other'; | ||
@@ -251,2 +262,3 @@ | ||
type TransChild = React.ReactNode | Record<string, unknown>; | ||
export type TransProps< | ||
@@ -258,3 +270,3 @@ K extends TFuncKey<N, TKPrefix> extends infer A ? A : never, | ||
> = E & { | ||
children?: React.ReactNode | Record<string, unknown>; | ||
children?: TransChild | TransChild[]; | ||
components?: readonly React.ReactNode[] | { readonly [tagName: string]: React.ReactNode }; | ||
@@ -261,0 +273,0 @@ count?: number; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
351687
6195