@cloudtower/parrot 0.9.0 → 0.11.0
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/.turbo/turbo-prepublish.log +23 -0
- package/.turbo/turbo-typings.log +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/parrotI18n.d.ts +1 -0
- package/dist/parrotI18n.js +28 -4
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/parrotI18n.ts +22 -5
- package/yarn-error.log +0 -19134
@@ -0,0 +1,23 @@
|
|
1
|
+
[32m@tower/i18n:prepublish: [0mcache hit, replaying output [2m3aaff15b304d5006[0m
|
2
|
+
[32m@tower/i18n:prepublish: [0m$ npm run build && npm run typings
|
3
|
+
[32m@tower/i18n:prepublish: [0mnpm WARN ignoring workspace config at /home/cqh/workspace/smartx/tower/packages/i18n/.npmrc
|
4
|
+
[32m@tower/i18n:prepublish: [0m
|
5
|
+
[32m@tower/i18n:prepublish: [0m> @tower/i18n@1.9.0 build
|
6
|
+
[32m@tower/i18n:prepublish: [0m> tsc -b .
|
7
|
+
[32m@tower/i18n:prepublish: [0m
|
8
|
+
[32m@tower/i18n:prepublish: [0m
|
9
|
+
[32m@tower/i18n:prepublish: [0m> @tower/i18n@1.9.0 postbuild
|
10
|
+
[32m@tower/i18n:prepublish: [0m> npm run load
|
11
|
+
[32m@tower/i18n:prepublish: [0m
|
12
|
+
[32m@tower/i18n:prepublish: [0mnpm WARN ignoring workspace config at /home/cqh/workspace/smartx/tower/packages/i18n/.npmrc
|
13
|
+
[32m@tower/i18n:prepublish: [0m
|
14
|
+
[32m@tower/i18n:prepublish: [0m> @tower/i18n@1.9.0 load
|
15
|
+
[32m@tower/i18n:prepublish: [0m> node ./scripts/locales-loader.js
|
16
|
+
[32m@tower/i18n:prepublish: [0m
|
17
|
+
[32m@tower/i18n:prepublish: [0m2 zones found, loading locales and templates into seperate zones
|
18
|
+
[32m@tower/i18n:prepublish: [0mnpm WARN ignoring workspace config at /home/cqh/workspace/smartx/tower/packages/i18n/.npmrc
|
19
|
+
[32m@tower/i18n:prepublish: [0m
|
20
|
+
[32m@tower/i18n:prepublish: [0m> @tower/i18n@1.9.0 typings
|
21
|
+
[32m@tower/i18n:prepublish: [0m> tsc --emitDeclarationOnly
|
22
|
+
[32m@tower/i18n:prepublish: [0m
|
23
|
+
[32m@tower/i18n:prepublish: [0m$ node ../eslint-plugin-i18n/lib/generate/index.js
|
@@ -0,0 +1 @@
|
|
1
|
+
[36m@tower/i18n:typings[0m: cache hit, replaying output [2me277aab270a4094c[0m
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/parrotI18n.d.ts
CHANGED
package/dist/parrotI18n.js
CHANGED
@@ -1,10 +1,34 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
1
12
|
import i18next from "i18next";
|
2
13
|
import locales from "./locales";
|
3
14
|
var parrotI18n = i18next.createInstance({
|
4
|
-
|
15
|
+
lng: "zh-CN",
|
16
|
+
fallbackLng: "en-US",
|
5
17
|
debug: true,
|
6
|
-
|
7
|
-
|
8
|
-
|
18
|
+
interpolation: {
|
19
|
+
prefix: "{",
|
20
|
+
suffix: "}",
|
21
|
+
},
|
22
|
+
resources: {
|
23
|
+
"en-US": {
|
24
|
+
translation: __assign({}, locales["en-US"]),
|
25
|
+
},
|
26
|
+
"zh-CN": {
|
27
|
+
translation: __assign({}, locales["zh-CN"]),
|
28
|
+
},
|
29
|
+
},
|
9
30
|
});
|
10
31
|
export default parrotI18n;
|
32
|
+
export var initParrotI18n = function () {
|
33
|
+
parrotI18n.init({});
|
34
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cloudtower/parrot",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.11.0",
|
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": "750674fdc9c4bb7631e6a759c6a6ffce94de3a91"
|
26
26
|
}
|
package/src/index.ts
CHANGED
package/src/parrotI18n.ts
CHANGED
@@ -3,12 +3,29 @@ import i18next from "i18next";
|
|
3
3
|
import locales from "./locales";
|
4
4
|
|
5
5
|
const parrotI18n = i18next.createInstance({
|
6
|
-
|
6
|
+
lng: "zh-CN",
|
7
|
+
fallbackLng: "en-US",
|
7
8
|
debug: true,
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
interpolation: {
|
10
|
+
prefix: "{",
|
11
|
+
suffix: "}",
|
12
|
+
},
|
13
|
+
resources: {
|
14
|
+
"en-US": {
|
15
|
+
translation: {
|
16
|
+
...locales["en-US"],
|
17
|
+
},
|
18
|
+
},
|
19
|
+
"zh-CN": {
|
20
|
+
translation: {
|
21
|
+
...locales["zh-CN"],
|
22
|
+
},
|
23
|
+
},
|
24
|
+
},
|
12
25
|
});
|
13
26
|
|
14
27
|
export default parrotI18n;
|
28
|
+
|
29
|
+
export const initParrotI18n = () => {
|
30
|
+
parrotI18n.init({});
|
31
|
+
};
|