@cloudtower/parrot 0.17.7 → 0.17.9
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/dist/parrotI18n.d.ts +2 -1
- package/dist/parrotI18n.js +2 -3
- package/package.json +2 -2
- package/src/parrotI18n.ts +6 -4
package/dist/parrotI18n.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Callback, InitOptions } from "i18next";
|
1
2
|
declare const parrotI18n: import("i18next").i18n;
|
2
3
|
export default parrotI18n;
|
3
|
-
export declare const initParrotI18n: () => void;
|
4
|
+
export declare const initParrotI18n: (options: InitOptions, callback?: Callback | undefined) => void;
|
package/dist/parrotI18n.js
CHANGED
@@ -14,7 +14,6 @@ import locales from "./locales";
|
|
14
14
|
var parrotI18n = i18next.createInstance({
|
15
15
|
lng: "zh-CN",
|
16
16
|
fallbackLng: "en-US",
|
17
|
-
debug: true,
|
18
17
|
interpolation: {
|
19
18
|
prefix: "{",
|
20
19
|
suffix: "}",
|
@@ -29,6 +28,6 @@ var parrotI18n = i18next.createInstance({
|
|
29
28
|
},
|
30
29
|
});
|
31
30
|
export default parrotI18n;
|
32
|
-
export var initParrotI18n = function () {
|
33
|
-
parrotI18n.init(
|
31
|
+
export var initParrotI18n = function (options, callback) {
|
32
|
+
parrotI18n.init(options, callback);
|
34
33
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cloudtower/parrot",
|
3
|
-
"version": "0.17.
|
3
|
+
"version": "0.17.9",
|
4
4
|
"description": "i18n modules for cloudtower sparrow and eagle",
|
5
5
|
"keywords": [
|
6
6
|
"i18n",
|
@@ -22,5 +22,5 @@
|
|
22
22
|
"i18next": "^21.10.0",
|
23
23
|
"typescript": "^4.8.4"
|
24
24
|
},
|
25
|
-
"gitHead": "
|
25
|
+
"gitHead": "1a215b9fe982fbf09abf3506572d245548e004e8"
|
26
26
|
}
|
package/src/parrotI18n.ts
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
import i18next from "i18next";
|
1
|
+
import i18next, { Callback, InitOptions } from "i18next";
|
2
2
|
|
3
3
|
import locales from "./locales";
|
4
4
|
|
5
5
|
const parrotI18n = i18next.createInstance({
|
6
6
|
lng: "zh-CN",
|
7
7
|
fallbackLng: "en-US",
|
8
|
-
debug: true,
|
9
8
|
interpolation: {
|
10
9
|
prefix: "{",
|
11
10
|
suffix: "}",
|
@@ -26,6 +25,9 @@ const parrotI18n = i18next.createInstance({
|
|
26
25
|
|
27
26
|
export default parrotI18n;
|
28
27
|
|
29
|
-
export const initParrotI18n = (
|
30
|
-
|
28
|
+
export const initParrotI18n = (
|
29
|
+
options: InitOptions,
|
30
|
+
callback?: Callback | undefined
|
31
|
+
) => {
|
32
|
+
parrotI18n.init(options, callback);
|
31
33
|
};
|