react-i18next 12.2.0 → 12.2.2
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 +8 -0
- package/dist/commonjs/index.js +17 -11
- package/dist/es/index.js +4 -1
- package/dist/es/package.json +1 -1
- package/index.d.ts +1 -1
- package/package.json +10 -4
- package/src/index.js +4 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
### 12.2.2
|
|
2
|
+
|
|
3
|
+
- try to fix conditional exports in package.json
|
|
4
|
+
|
|
5
|
+
### 12.2.1
|
|
6
|
+
|
|
7
|
+
- type fix: the type of defaultNS in I18nextProvider should support string[] [1633](https://github.com/i18next/react-i18next/pull/1633)
|
|
8
|
+
|
|
1
9
|
### 12.2.0
|
|
2
10
|
|
|
3
11
|
- if defaultValue is passed in not ready t functio (via useTranslation) return that instead of the key, even though the user-land could should be fixed [1618](https://github.com/i18next/react-i18next/issues/1618)
|
package/dist/commonjs/index.js
CHANGED
|
@@ -51,40 +51,40 @@ Object.defineProperty(exports, "useSSR", {
|
|
|
51
51
|
return _useSSR.useSSR;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
Object.defineProperty(exports, "I18nContext", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _context.I18nContext;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
54
|
Object.defineProperty(exports, "initReactI18next", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
get: function get() {
|
|
63
|
-
return
|
|
57
|
+
return _initReactI18next.initReactI18next;
|
|
64
58
|
}
|
|
65
59
|
});
|
|
66
60
|
Object.defineProperty(exports, "setDefaults", {
|
|
67
61
|
enumerable: true,
|
|
68
62
|
get: function get() {
|
|
69
|
-
return
|
|
63
|
+
return _defaults.setDefaults;
|
|
70
64
|
}
|
|
71
65
|
});
|
|
72
66
|
Object.defineProperty(exports, "getDefaults", {
|
|
73
67
|
enumerable: true,
|
|
74
68
|
get: function get() {
|
|
75
|
-
return
|
|
69
|
+
return _defaults.getDefaults;
|
|
76
70
|
}
|
|
77
71
|
});
|
|
78
72
|
Object.defineProperty(exports, "setI18n", {
|
|
79
73
|
enumerable: true,
|
|
80
74
|
get: function get() {
|
|
81
|
-
return
|
|
75
|
+
return _i18nInstance.setI18n;
|
|
82
76
|
}
|
|
83
77
|
});
|
|
84
78
|
Object.defineProperty(exports, "getI18n", {
|
|
85
79
|
enumerable: true,
|
|
86
80
|
get: function get() {
|
|
87
|
-
return
|
|
81
|
+
return _i18nInstance.getI18n;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "I18nContext", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function get() {
|
|
87
|
+
return _context.I18nContext;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "composeInitialProps", {
|
|
@@ -117,6 +117,12 @@ var _withSSR = require("./withSSR.js");
|
|
|
117
117
|
|
|
118
118
|
var _useSSR = require("./useSSR.js");
|
|
119
119
|
|
|
120
|
+
var _initReactI18next = require("./initReactI18next.js");
|
|
121
|
+
|
|
122
|
+
var _defaults = require("./defaults.js");
|
|
123
|
+
|
|
124
|
+
var _i18nInstance = require("./i18nInstance.js");
|
|
125
|
+
|
|
120
126
|
var _context = require("./context.js");
|
|
121
127
|
|
|
122
128
|
var date = function date() {
|
package/dist/es/index.js
CHANGED
|
@@ -6,7 +6,10 @@ export { Translation } from './Translation.js';
|
|
|
6
6
|
export { I18nextProvider } from './I18nextProvider.js';
|
|
7
7
|
export { withSSR } from './withSSR.js';
|
|
8
8
|
export { useSSR } from './useSSR.js';
|
|
9
|
-
export {
|
|
9
|
+
export { initReactI18next } from './initReactI18next.js';
|
|
10
|
+
export { setDefaults, getDefaults } from './defaults.js';
|
|
11
|
+
export { setI18n, getI18n } from './i18nInstance.js';
|
|
12
|
+
export { I18nContext, composeInitialProps, getInitialProps } from './context.js';
|
|
10
13
|
export var date = function date() {
|
|
11
14
|
return '';
|
|
12
15
|
};
|
package/dist/es/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"12.2.
|
|
1
|
+
{"type":"module","version":"12.2.2"}
|
package/index.d.ts
CHANGED
|
@@ -130,7 +130,7 @@ export function withTranslation<
|
|
|
130
130
|
export interface I18nextProviderProps {
|
|
131
131
|
children?: React.ReactNode;
|
|
132
132
|
i18n: i18n;
|
|
133
|
-
defaultNS?: string;
|
|
133
|
+
defaultNS?: string | string[];
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
export const I18nextProvider: React.FunctionComponent<I18nextProviderProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-i18next",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.2",
|
|
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.ts",
|
|
@@ -21,18 +21,24 @@
|
|
|
21
21
|
"./package.json": "./package.json",
|
|
22
22
|
".": {
|
|
23
23
|
"types": "./index.d.ts",
|
|
24
|
+
"module": "./dist/es/index.js",
|
|
24
25
|
"import": "./dist/es/index.js",
|
|
25
|
-
"require": "./dist/commonjs/index.js"
|
|
26
|
+
"require": "./dist/commonjs/index.js",
|
|
27
|
+
"default": "./dist/es/index.js"
|
|
26
28
|
},
|
|
27
29
|
"./TransWithoutContext": {
|
|
28
30
|
"types": "./TransWithoutContext.d.ts",
|
|
31
|
+
"module": "./dist/es/TransWithoutContext.js",
|
|
29
32
|
"import": "./dist/es/TransWithoutContext.js",
|
|
30
|
-
"require": "./dist/commonjs/TransWithoutContext.js"
|
|
33
|
+
"require": "./dist/commonjs/TransWithoutContext.js",
|
|
34
|
+
"default": "./dist/es/TransWithoutContext.js"
|
|
31
35
|
},
|
|
32
36
|
"./initReactI18next": {
|
|
33
37
|
"types": "./initReactI18next.d.ts",
|
|
38
|
+
"module": "./dist/es/initReactI18next.js",
|
|
34
39
|
"import": "./dist/es/initReactI18next.js",
|
|
35
|
-
"require": "./dist/commonjs/initReactI18next.js"
|
|
40
|
+
"require": "./dist/commonjs/initReactI18next.js",
|
|
41
|
+
"default": "./dist/es/initReactI18next.js"
|
|
36
42
|
}
|
|
37
43
|
},
|
|
38
44
|
"homepage": "https://github.com/i18next/react-i18next",
|
package/src/index.js
CHANGED
|
@@ -6,17 +6,11 @@ export { Translation } from './Translation.js';
|
|
|
6
6
|
export { I18nextProvider } from './I18nextProvider.js';
|
|
7
7
|
export { withSSR } from './withSSR.js';
|
|
8
8
|
export { useSSR } from './useSSR.js';
|
|
9
|
+
export { initReactI18next } from './initReactI18next.js';
|
|
10
|
+
export { setDefaults, getDefaults } from './defaults.js';
|
|
11
|
+
export { setI18n, getI18n } from './i18nInstance.js';
|
|
9
12
|
|
|
10
|
-
export {
|
|
11
|
-
I18nContext,
|
|
12
|
-
initReactI18next,
|
|
13
|
-
setDefaults,
|
|
14
|
-
getDefaults,
|
|
15
|
-
setI18n,
|
|
16
|
-
getI18n,
|
|
17
|
-
composeInitialProps,
|
|
18
|
-
getInitialProps,
|
|
19
|
-
} from './context.js';
|
|
13
|
+
export { I18nContext, composeInitialProps, getInitialProps } from './context.js';
|
|
20
14
|
|
|
21
15
|
// dummy functions for icu.macro support
|
|
22
16
|
|