@cloudtower/parrot 0.19.1 → 0.19.2-beta.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/dist/esm/index.js +6 -5
- package/dist/esm/stats1.html +1 -1
- package/dist/parrotI18n.d.ts +2 -1
- package/dist/umd/index.js +9 -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";
|
@@ -213,10 +214,9 @@ var __spreadValues = (a, b) => {
|
|
213
214
|
}
|
214
215
|
return a;
|
215
216
|
};
|
216
|
-
const
|
217
|
+
const defaultOptions = {
|
217
218
|
lng: "zh-CN",
|
218
219
|
fallbackLng: "en-US",
|
219
|
-
debug: true,
|
220
220
|
interpolation: {
|
221
221
|
prefix: "{",
|
222
222
|
suffix: "}"
|
@@ -229,9 +229,10 @@ const parrotI18n = i18next.createInstance({
|
|
229
229
|
translation: __spreadValues({}, locales["zh-CN"])
|
230
230
|
}
|
231
231
|
}
|
232
|
-
}
|
233
|
-
const
|
234
|
-
|
232
|
+
};
|
233
|
+
const parrotI18n = i18next.createInstance(defaultOptions);
|
234
|
+
const initParrotI18n = (options, callback) => {
|
235
|
+
parrotI18n.init(merge(defaultOptions, options), callback);
|
235
236
|
};
|
236
237
|
|
237
238
|
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":"04c4-25","name":"common.json"},{"uid":"04c4-27","name":"components.json"},{"uid":"04c4-29","name":"metric.json"},{"uid":"04c4-31","name":"index.ts"}]},{"name":"zh-CN","children":[{"uid":"04c4-33","name":"common.json"},{"uid":"04c4-35","name":"components.json"},{"uid":"04c4-37","name":"metric.json"},{"uid":"04c4-39","name":"index.ts"}]},{"uid":"04c4-41","name":"index.ts"}]},{"uid":"04c4-43","name":"parrotI18n.ts"},{"uid":"04c4-45","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"04c4-25":{"renderedLength":1259,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-24"},"04c4-27":{"renderedLength":808,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-26"},"04c4-29":{"renderedLength":165,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-28"},"04c4-31":{"renderedLength":88,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-30"},"04c4-33":{"renderedLength":1159,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-32"},"04c4-35":{"renderedLength":756,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-34"},"04c4-37":{"renderedLength":157,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-36"},"04c4-39":{"renderedLength":52,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-38"},"04c4-41":{"renderedLength":59,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-40"},"04c4-43":{"renderedLength":1155,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-42"},"04c4-45":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-44"}},"nodeMetas":{"04c4-24":{"id":"/src/locales/en-US/common.json","moduleParts":{"index.js":"04c4-25"},"imported":[],"importedBy":[{"uid":"04c4-30"}]},"04c4-26":{"id":"/src/locales/en-US/components.json","moduleParts":{"index.js":"04c4-27"},"imported":[],"importedBy":[{"uid":"04c4-30"}]},"04c4-28":{"id":"/src/locales/en-US/metric.json","moduleParts":{"index.js":"04c4-29"},"imported":[],"importedBy":[{"uid":"04c4-30"}]},"04c4-30":{"id":"/src/locales/en-US/index.ts","moduleParts":{"index.js":"04c4-31"},"imported":[{"uid":"04c4-24"},{"uid":"04c4-26"},{"uid":"04c4-28"}],"importedBy":[{"uid":"04c4-40"}]},"04c4-32":{"id":"/src/locales/zh-CN/common.json","moduleParts":{"index.js":"04c4-33"},"imported":[],"importedBy":[{"uid":"04c4-38"}]},"04c4-34":{"id":"/src/locales/zh-CN/components.json","moduleParts":{"index.js":"04c4-35"},"imported":[],"importedBy":[{"uid":"04c4-38"}]},"04c4-36":{"id":"/src/locales/zh-CN/metric.json","moduleParts":{"index.js":"04c4-37"},"imported":[],"importedBy":[{"uid":"04c4-38"}]},"04c4-38":{"id":"/src/locales/zh-CN/index.ts","moduleParts":{"index.js":"04c4-39"},"imported":[{"uid":"04c4-32"},{"uid":"04c4-34"},{"uid":"04c4-36"}],"importedBy":[{"uid":"04c4-40"}]},"04c4-40":{"id":"/src/locales/index.ts","moduleParts":{"index.js":"04c4-41"},"imported":[{"uid":"04c4-30"},{"uid":"04c4-38"}],"importedBy":[{"uid":"04c4-44"},{"uid":"04c4-42"}]},"04c4-42":{"id":"/src/parrotI18n.ts","moduleParts":{"index.js":"04c4-43"},"imported":[{"uid":"04c4-46"},{"uid":"04c4-47"},{"uid":"04c4-40"}],"importedBy":[{"uid":"04c4-44"}]},"04c4-44":{"id":"/src/index.ts","moduleParts":{"index.js":"04c4-45"},"imported":[{"uid":"04c4-40"},{"uid":"04c4-42"}],"importedBy":[],"isEntry":true},"04c4-46":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"04c4-42"}],"isExternal":true},"04c4-47":{"id":"lodash.merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"04c4-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/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";
|
@@ -217,10 +217,9 @@
|
|
217
217
|
}
|
218
218
|
return a;
|
219
219
|
};
|
220
|
-
const
|
220
|
+
const defaultOptions = {
|
221
221
|
lng: "zh-CN",
|
222
222
|
fallbackLng: "en-US",
|
223
|
-
debug: true,
|
224
223
|
interpolation: {
|
225
224
|
prefix: "{",
|
226
225
|
suffix: "}"
|
@@ -233,9 +232,10 @@
|
|
233
232
|
translation: __spreadValues({}, locales["zh-CN"])
|
234
233
|
}
|
235
234
|
}
|
236
|
-
}
|
237
|
-
const
|
238
|
-
|
235
|
+
};
|
236
|
+
const parrotI18n = i18next.createInstance(defaultOptions);
|
237
|
+
const initParrotI18n = (options, callback) => {
|
238
|
+
parrotI18n.init(merge(defaultOptions, options), callback);
|
239
239
|
};
|
240
240
|
|
241
241
|
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":"04c4-1","name":"common.json"},{"uid":"04c4-3","name":"components.json"},{"uid":"04c4-5","name":"metric.json"},{"uid":"04c4-7","name":"index.ts"}]},{"name":"zh-CN","children":[{"uid":"04c4-9","name":"common.json"},{"uid":"04c4-11","name":"components.json"},{"uid":"04c4-13","name":"metric.json"},{"uid":"04c4-15","name":"index.ts"}]},{"uid":"04c4-17","name":"index.ts"}]},{"uid":"04c4-19","name":"parrotI18n.ts"},{"uid":"04c4-21","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"04c4-1":{"renderedLength":1363,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-0"},"04c4-3":{"renderedLength":862,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-2"},"04c4-5":{"renderedLength":181,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-4"},"04c4-7":{"renderedLength":98,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-6"},"04c4-9":{"renderedLength":1263,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-8"},"04c4-11":{"renderedLength":810,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-10"},"04c4-13":{"renderedLength":173,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-12"},"04c4-15":{"renderedLength":62,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-14"},"04c4-17":{"renderedLength":67,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-16"},"04c4-19":{"renderedLength":1227,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-18"},"04c4-21":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"04c4-20"}},"nodeMetas":{"04c4-0":{"id":"/src/locales/en-US/common.json","moduleParts":{"index.js":"04c4-1"},"imported":[],"importedBy":[{"uid":"04c4-6"}]},"04c4-2":{"id":"/src/locales/en-US/components.json","moduleParts":{"index.js":"04c4-3"},"imported":[],"importedBy":[{"uid":"04c4-6"}]},"04c4-4":{"id":"/src/locales/en-US/metric.json","moduleParts":{"index.js":"04c4-5"},"imported":[],"importedBy":[{"uid":"04c4-6"}]},"04c4-6":{"id":"/src/locales/en-US/index.ts","moduleParts":{"index.js":"04c4-7"},"imported":[{"uid":"04c4-0"},{"uid":"04c4-2"},{"uid":"04c4-4"}],"importedBy":[{"uid":"04c4-16"}]},"04c4-8":{"id":"/src/locales/zh-CN/common.json","moduleParts":{"index.js":"04c4-9"},"imported":[],"importedBy":[{"uid":"04c4-14"}]},"04c4-10":{"id":"/src/locales/zh-CN/components.json","moduleParts":{"index.js":"04c4-11"},"imported":[],"importedBy":[{"uid":"04c4-14"}]},"04c4-12":{"id":"/src/locales/zh-CN/metric.json","moduleParts":{"index.js":"04c4-13"},"imported":[],"importedBy":[{"uid":"04c4-14"}]},"04c4-14":{"id":"/src/locales/zh-CN/index.ts","moduleParts":{"index.js":"04c4-15"},"imported":[{"uid":"04c4-8"},{"uid":"04c4-10"},{"uid":"04c4-12"}],"importedBy":[{"uid":"04c4-16"}]},"04c4-16":{"id":"/src/locales/index.ts","moduleParts":{"index.js":"04c4-17"},"imported":[{"uid":"04c4-6"},{"uid":"04c4-14"}],"importedBy":[{"uid":"04c4-20"},{"uid":"04c4-18"}]},"04c4-18":{"id":"/src/parrotI18n.ts","moduleParts":{"index.js":"04c4-19"},"imported":[{"uid":"04c4-22"},{"uid":"04c4-23"},{"uid":"04c4-16"}],"importedBy":[{"uid":"04c4-20"}]},"04c4-20":{"id":"/src/index.ts","moduleParts":{"index.js":"04c4-21"},"imported":[{"uid":"04c4-16"},{"uid":"04c4-18"}],"importedBy":[],"isEntry":true},"04c4-22":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"04c4-18"}],"isExternal":true},"04c4-23":{"id":"lodash.merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"04c4-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.19.
|
3
|
+
"version": "0.19.2-beta.0",
|
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": "ea1cbd77e199cf9a44ca57d4152319817862f76d"
|
37
39
|
}
|