@cloudtower/parrot 0.19.2 → 0.20.1
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/esm/index.js +10 -5
- package/dist/esm/stats1.html +1 -1
- package/dist/locales/en-US/index.d.ts +1 -0
- package/dist/locales/index.d.ts +2 -0
- package/dist/locales/zh-CN/index.d.ts +1 -0
- package/dist/parrotI18n.d.ts +2 -1
- package/dist/umd/index.js +13 -9
- package/dist/umd/stats1.html +1 -1
- package/package.json +5 -3
package/dist/esm/index.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import i18next from 'i18next';
|
2
|
+
import merge from 'lodash.merge';
|
2
3
|
|
3
4
|
var _action_$1 = "Action";
|
4
5
|
var action$1 = "Action";
|
@@ -63,6 +64,7 @@ var next_items$1 = "Next {size} items";
|
|
63
64
|
var push_to$1 = "Jump to";
|
64
65
|
var pagination_range$1 = "Item {range1} – {range2}";
|
65
66
|
var pagination_total$1 = "Item {range1} – {range2}, {total} in total";
|
67
|
+
var pagination_lots_total$1 = "{total} items in total";
|
66
68
|
var unknow_error$1 = "Unknown error";
|
67
69
|
var to$1 = "to";
|
68
70
|
var components$1 = {
|
@@ -77,6 +79,7 @@ var components$1 = {
|
|
77
79
|
push_to: push_to$1,
|
78
80
|
pagination_range: pagination_range$1,
|
79
81
|
pagination_total: pagination_total$1,
|
82
|
+
pagination_lots_total: pagination_lots_total$1,
|
80
83
|
unknow_error: unknow_error$1,
|
81
84
|
to: to$1
|
82
85
|
};
|
@@ -159,6 +162,7 @@ var next_items = "后 {size} 项";
|
|
159
162
|
var push_to = "跳转至";
|
160
163
|
var pagination_range = "第 {range1} – {range2} 项";
|
161
164
|
var pagination_total = "第 {range1} – {range2} 项,共 {total} 项";
|
165
|
+
var pagination_lots_total = "共 {total} 项";
|
162
166
|
var unknow_error = "未知错误";
|
163
167
|
var to = "至";
|
164
168
|
var components = {
|
@@ -173,6 +177,7 @@ var components = {
|
|
173
177
|
push_to: push_to,
|
174
178
|
pagination_range: pagination_range,
|
175
179
|
pagination_total: pagination_total,
|
180
|
+
pagination_lots_total: pagination_lots_total,
|
176
181
|
unknow_error: unknow_error,
|
177
182
|
to: to
|
178
183
|
};
|
@@ -213,10 +218,9 @@ var __spreadValues = (a, b) => {
|
|
213
218
|
}
|
214
219
|
return a;
|
215
220
|
};
|
216
|
-
const
|
221
|
+
const defaultOptions = {
|
217
222
|
lng: "zh-CN",
|
218
223
|
fallbackLng: "en-US",
|
219
|
-
debug: true,
|
220
224
|
interpolation: {
|
221
225
|
prefix: "{",
|
222
226
|
suffix: "}"
|
@@ -229,9 +233,10 @@ const parrotI18n = i18next.createInstance({
|
|
229
233
|
translation: __spreadValues({}, locales["zh-CN"])
|
230
234
|
}
|
231
235
|
}
|
232
|
-
}
|
233
|
-
const
|
234
|
-
|
236
|
+
};
|
237
|
+
const parrotI18n = i18next.createInstance(defaultOptions);
|
238
|
+
const initParrotI18n = (options, callback) => {
|
239
|
+
parrotI18n.init(merge(defaultOptions, options), callback);
|
235
240
|
};
|
236
241
|
|
237
242
|
export { initParrotI18n, locales, parrotI18n };
|
package/dist/esm/stats1.html
CHANGED
@@ -6157,7 +6157,7 @@ var drawChart = (function (exports) {
|
|
6157
6157
|
</script>
|
6158
6158
|
<script>
|
6159
6159
|
/*<!--*/
|
6160
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"locales","children":[{"name":"en-US","children":[{"uid":"
|
6160
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"locales","children":[{"name":"en-US","children":[{"uid":"fcb2-25","name":"common.json"},{"uid":"fcb2-27","name":"components.json"},{"uid":"fcb2-29","name":"metric.json"},{"uid":"fcb2-31","name":"index.ts"}]},{"name":"zh-CN","children":[{"uid":"fcb2-33","name":"common.json"},{"uid":"fcb2-35","name":"components.json"},{"uid":"fcb2-37","name":"metric.json"},{"uid":"fcb2-39","name":"index.ts"}]},{"uid":"fcb2-41","name":"index.ts"}]},{"uid":"fcb2-43","name":"parrotI18n.ts"},{"uid":"fcb2-45","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fcb2-25":{"renderedLength":1259,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-24"},"fcb2-27":{"renderedLength":913,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-26"},"fcb2-29":{"renderedLength":165,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-28"},"fcb2-31":{"renderedLength":88,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-30"},"fcb2-33":{"renderedLength":1159,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-32"},"fcb2-35":{"renderedLength":850,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-34"},"fcb2-37":{"renderedLength":157,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-36"},"fcb2-39":{"renderedLength":52,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-38"},"fcb2-41":{"renderedLength":59,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-40"},"fcb2-43":{"renderedLength":1155,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-42"},"fcb2-45":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-44"}},"nodeMetas":{"fcb2-24":{"id":"/src/locales/en-US/common.json","moduleParts":{"index.js":"fcb2-25"},"imported":[],"importedBy":[{"uid":"fcb2-30"}]},"fcb2-26":{"id":"/src/locales/en-US/components.json","moduleParts":{"index.js":"fcb2-27"},"imported":[],"importedBy":[{"uid":"fcb2-30"}]},"fcb2-28":{"id":"/src/locales/en-US/metric.json","moduleParts":{"index.js":"fcb2-29"},"imported":[],"importedBy":[{"uid":"fcb2-30"}]},"fcb2-30":{"id":"/src/locales/en-US/index.ts","moduleParts":{"index.js":"fcb2-31"},"imported":[{"uid":"fcb2-24"},{"uid":"fcb2-26"},{"uid":"fcb2-28"}],"importedBy":[{"uid":"fcb2-40"}]},"fcb2-32":{"id":"/src/locales/zh-CN/common.json","moduleParts":{"index.js":"fcb2-33"},"imported":[],"importedBy":[{"uid":"fcb2-38"}]},"fcb2-34":{"id":"/src/locales/zh-CN/components.json","moduleParts":{"index.js":"fcb2-35"},"imported":[],"importedBy":[{"uid":"fcb2-38"}]},"fcb2-36":{"id":"/src/locales/zh-CN/metric.json","moduleParts":{"index.js":"fcb2-37"},"imported":[],"importedBy":[{"uid":"fcb2-38"}]},"fcb2-38":{"id":"/src/locales/zh-CN/index.ts","moduleParts":{"index.js":"fcb2-39"},"imported":[{"uid":"fcb2-32"},{"uid":"fcb2-34"},{"uid":"fcb2-36"}],"importedBy":[{"uid":"fcb2-40"}]},"fcb2-40":{"id":"/src/locales/index.ts","moduleParts":{"index.js":"fcb2-41"},"imported":[{"uid":"fcb2-30"},{"uid":"fcb2-38"}],"importedBy":[{"uid":"fcb2-44"},{"uid":"fcb2-42"}]},"fcb2-42":{"id":"/src/parrotI18n.ts","moduleParts":{"index.js":"fcb2-43"},"imported":[{"uid":"fcb2-46"},{"uid":"fcb2-47"},{"uid":"fcb2-40"}],"importedBy":[{"uid":"fcb2-44"}]},"fcb2-44":{"id":"/src/index.ts","moduleParts":{"index.js":"fcb2-45"},"imported":[{"uid":"fcb2-40"},{"uid":"fcb2-42"}],"importedBy":[],"isEntry":true},"fcb2-46":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcb2-42"}],"isExternal":true},"fcb2-47":{"id":"lodash.merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcb2-42"}],"isExternal":true}},"env":{"rollup":"3.15.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
6161
6161
|
|
6162
6162
|
const run = () => {
|
6163
6163
|
const width = window.innerWidth;
|
package/dist/locales/index.d.ts
CHANGED
@@ -39,6 +39,7 @@ declare const locales: {
|
|
39
39
|
push_to: string;
|
40
40
|
pagination_range: string;
|
41
41
|
pagination_total: string;
|
42
|
+
pagination_lots_total: string;
|
42
43
|
unknow_error: string;
|
43
44
|
to: string;
|
44
45
|
};
|
@@ -88,6 +89,7 @@ declare const locales: {
|
|
88
89
|
push_to: string;
|
89
90
|
pagination_range: string;
|
90
91
|
pagination_total: string;
|
92
|
+
pagination_lots_total: string;
|
91
93
|
unknow_error: string;
|
92
94
|
to: string;
|
93
95
|
};
|
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/umd/index.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('i18next')) :
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'i18next'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.index = {}, global.i18next));
|
5
|
-
})(this, (function (exports, i18next) { 'use strict';
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('i18next'), require('lodash.merge')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'i18next', 'lodash.merge'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.index = {}, global.i18next, global.merge));
|
5
|
+
})(this, (function (exports, i18next, merge) { 'use strict';
|
6
6
|
|
7
7
|
var _action_$1 = "Action";
|
8
8
|
var action$1 = "Action";
|
@@ -67,6 +67,7 @@
|
|
67
67
|
var push_to$1 = "Jump to";
|
68
68
|
var pagination_range$1 = "Item {range1} – {range2}";
|
69
69
|
var pagination_total$1 = "Item {range1} – {range2}, {total} in total";
|
70
|
+
var pagination_lots_total$1 = "{total} items in total";
|
70
71
|
var unknow_error$1 = "Unknown error";
|
71
72
|
var to$1 = "to";
|
72
73
|
var components$1 = {
|
@@ -81,6 +82,7 @@
|
|
81
82
|
push_to: push_to$1,
|
82
83
|
pagination_range: pagination_range$1,
|
83
84
|
pagination_total: pagination_total$1,
|
85
|
+
pagination_lots_total: pagination_lots_total$1,
|
84
86
|
unknow_error: unknow_error$1,
|
85
87
|
to: to$1
|
86
88
|
};
|
@@ -163,6 +165,7 @@
|
|
163
165
|
var push_to = "跳转至";
|
164
166
|
var pagination_range = "第 {range1} – {range2} 项";
|
165
167
|
var pagination_total = "第 {range1} – {range2} 项,共 {total} 项";
|
168
|
+
var pagination_lots_total = "共 {total} 项";
|
166
169
|
var unknow_error = "未知错误";
|
167
170
|
var to = "至";
|
168
171
|
var components = {
|
@@ -177,6 +180,7 @@
|
|
177
180
|
push_to: push_to,
|
178
181
|
pagination_range: pagination_range,
|
179
182
|
pagination_total: pagination_total,
|
183
|
+
pagination_lots_total: pagination_lots_total,
|
180
184
|
unknow_error: unknow_error,
|
181
185
|
to: to
|
182
186
|
};
|
@@ -217,10 +221,9 @@
|
|
217
221
|
}
|
218
222
|
return a;
|
219
223
|
};
|
220
|
-
const
|
224
|
+
const defaultOptions = {
|
221
225
|
lng: "zh-CN",
|
222
226
|
fallbackLng: "en-US",
|
223
|
-
debug: true,
|
224
227
|
interpolation: {
|
225
228
|
prefix: "{",
|
226
229
|
suffix: "}"
|
@@ -233,9 +236,10 @@
|
|
233
236
|
translation: __spreadValues({}, locales["zh-CN"])
|
234
237
|
}
|
235
238
|
}
|
236
|
-
}
|
237
|
-
const
|
238
|
-
|
239
|
+
};
|
240
|
+
const parrotI18n = i18next.createInstance(defaultOptions);
|
241
|
+
const initParrotI18n = (options, callback) => {
|
242
|
+
parrotI18n.init(merge(defaultOptions, options), callback);
|
239
243
|
};
|
240
244
|
|
241
245
|
exports.initParrotI18n = initParrotI18n;
|
package/dist/umd/stats1.html
CHANGED
@@ -6157,7 +6157,7 @@ var drawChart = (function (exports) {
|
|
6157
6157
|
</script>
|
6158
6158
|
<script>
|
6159
6159
|
/*<!--*/
|
6160
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"locales","children":[{"name":"en-US","children":[{"uid":"
|
6160
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"locales","children":[{"name":"en-US","children":[{"uid":"fcb2-1","name":"common.json"},{"uid":"fcb2-3","name":"components.json"},{"uid":"fcb2-5","name":"metric.json"},{"uid":"fcb2-7","name":"index.ts"}]},{"name":"zh-CN","children":[{"uid":"fcb2-9","name":"common.json"},{"uid":"fcb2-11","name":"components.json"},{"uid":"fcb2-13","name":"metric.json"},{"uid":"fcb2-15","name":"index.ts"}]},{"uid":"fcb2-17","name":"index.ts"}]},{"uid":"fcb2-19","name":"parrotI18n.ts"},{"uid":"fcb2-21","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fcb2-1":{"renderedLength":1363,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-0"},"fcb2-3":{"renderedLength":971,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-2"},"fcb2-5":{"renderedLength":181,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-4"},"fcb2-7":{"renderedLength":98,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-6"},"fcb2-9":{"renderedLength":1263,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-8"},"fcb2-11":{"renderedLength":908,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-10"},"fcb2-13":{"renderedLength":173,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-12"},"fcb2-15":{"renderedLength":62,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-14"},"fcb2-17":{"renderedLength":67,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-16"},"fcb2-19":{"renderedLength":1227,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-18"},"fcb2-21":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"fcb2-20"}},"nodeMetas":{"fcb2-0":{"id":"/src/locales/en-US/common.json","moduleParts":{"index.js":"fcb2-1"},"imported":[],"importedBy":[{"uid":"fcb2-6"}]},"fcb2-2":{"id":"/src/locales/en-US/components.json","moduleParts":{"index.js":"fcb2-3"},"imported":[],"importedBy":[{"uid":"fcb2-6"}]},"fcb2-4":{"id":"/src/locales/en-US/metric.json","moduleParts":{"index.js":"fcb2-5"},"imported":[],"importedBy":[{"uid":"fcb2-6"}]},"fcb2-6":{"id":"/src/locales/en-US/index.ts","moduleParts":{"index.js":"fcb2-7"},"imported":[{"uid":"fcb2-0"},{"uid":"fcb2-2"},{"uid":"fcb2-4"}],"importedBy":[{"uid":"fcb2-16"}]},"fcb2-8":{"id":"/src/locales/zh-CN/common.json","moduleParts":{"index.js":"fcb2-9"},"imported":[],"importedBy":[{"uid":"fcb2-14"}]},"fcb2-10":{"id":"/src/locales/zh-CN/components.json","moduleParts":{"index.js":"fcb2-11"},"imported":[],"importedBy":[{"uid":"fcb2-14"}]},"fcb2-12":{"id":"/src/locales/zh-CN/metric.json","moduleParts":{"index.js":"fcb2-13"},"imported":[],"importedBy":[{"uid":"fcb2-14"}]},"fcb2-14":{"id":"/src/locales/zh-CN/index.ts","moduleParts":{"index.js":"fcb2-15"},"imported":[{"uid":"fcb2-8"},{"uid":"fcb2-10"},{"uid":"fcb2-12"}],"importedBy":[{"uid":"fcb2-16"}]},"fcb2-16":{"id":"/src/locales/index.ts","moduleParts":{"index.js":"fcb2-17"},"imported":[{"uid":"fcb2-6"},{"uid":"fcb2-14"}],"importedBy":[{"uid":"fcb2-20"},{"uid":"fcb2-18"}]},"fcb2-18":{"id":"/src/parrotI18n.ts","moduleParts":{"index.js":"fcb2-19"},"imported":[{"uid":"fcb2-22"},{"uid":"fcb2-23"},{"uid":"fcb2-16"}],"importedBy":[{"uid":"fcb2-20"}]},"fcb2-20":{"id":"/src/index.ts","moduleParts":{"index.js":"fcb2-21"},"imported":[{"uid":"fcb2-16"},{"uid":"fcb2-18"}],"importedBy":[],"isEntry":true},"fcb2-22":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcb2-18"}],"isExternal":true},"fcb2-23":{"id":"lodash.merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcb2-18"}],"isExternal":true}},"env":{"rollup":"3.15.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
6161
6161
|
|
6162
6162
|
const run = () => {
|
6163
6163
|
const width = window.innerWidth;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cloudtower/parrot",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.20.1",
|
4
4
|
"description": "i18n modules for cloudtower sparrow and eagle",
|
5
5
|
"keywords": [
|
6
6
|
"i18n",
|
@@ -22,10 +22,12 @@
|
|
22
22
|
"lint": "eslint src --ext .ts --quiet"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"i18next": "21.10.0"
|
25
|
+
"i18next": "21.10.0",
|
26
|
+
"lodash.merge": "^4.6.2"
|
26
27
|
},
|
27
28
|
"devDependencies": {
|
28
29
|
"@rollup/plugin-json": "^6.0.0",
|
30
|
+
"@types/lodash.merge": "^4.6.7",
|
29
31
|
"ejs": "^3.1.8",
|
30
32
|
"rollup": "^3.12.1",
|
31
33
|
"rollup-plugin-esbuild": "5.0.0",
|
@@ -33,5 +35,5 @@
|
|
33
35
|
"rollup-plugin-visualizer": "5.9.0",
|
34
36
|
"typescript": "^4.8.4"
|
35
37
|
},
|
36
|
-
"gitHead": "
|
38
|
+
"gitHead": "a27fb87b94c8247394a5e8f2aacd581d994a2f18"
|
37
39
|
}
|