@cloudtower/parrot 0.17.10 → 0.17.12

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.
@@ -1,3 +1,4 @@
1
1
  warning package.json: No license field
2
+ warning package.json: "dependencies" has dependency "i18next" with range "21.10.0" that collides with a dependency in "devDependencies" of the same name with version "^21.10.0"
2
3
  $ rm -rf dist
3
4
  $ tsc
File without changes
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { default as locales } from "./locales";
2
+ export { default as parrotI18n } from "./parrotI18n";
3
+ export * from "./parrotI18n";
@@ -0,0 +1,27 @@
1
+ {
2
+ "_action_": "Action",
3
+ "action": "Action",
4
+ "all": "All",
5
+ "cancel": "Cancel",
6
+ "clear_query": "Clear the filter criteria",
7
+ "close": "Close",
8
+ "contains": "Contains",
9
+ "confirm": "Confirm",
10
+ "empty": "No ",
11
+ "enable": "Enable",
12
+ "error": "Error",
13
+ "next_step": "Next",
14
+ "not_contains": "Not Contains",
15
+ "not_enable": "Not enabled",
16
+ "prev_step": "Previous",
17
+ "io": "Total I/O",
18
+ "load_failed": "Failed to load",
19
+ "param": "Parameter",
20
+ "no": "No",
21
+ "message": "Message",
22
+ "architecture": "CPU Architecture",
23
+ "calculation": "Computing",
24
+ "on": "On",
25
+ "error_message": "Error Message",
26
+ "retry": "Retry"
27
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "contains": "Contains",
3
+ "custom_column": "Customize Columns & Order",
4
+ "in": "belongs to",
5
+ "not": "Not",
6
+ "not_contains": "Not Contains",
7
+ "or": "or",
8
+ "previous_items": "Previous {size} items",
9
+ "next_items": "Next {size} items",
10
+ "push_to": "Jump to",
11
+ "pagination_range": "Item {range1} – {range2}",
12
+ "pagination_total": "Item {range1} – {range2}, {total} in total",
13
+ "unknow_error": "Unknown error",
14
+ "to": "to"
15
+ }
@@ -0,0 +1,50 @@
1
+ declare const locale: {
2
+ common: {
3
+ _action_: string;
4
+ action: string;
5
+ all: string;
6
+ cancel: string;
7
+ clear_query: string;
8
+ close: string;
9
+ contains: string;
10
+ confirm: string;
11
+ empty: string;
12
+ enable: string;
13
+ error: string;
14
+ next_step: string;
15
+ not_contains: string;
16
+ not_enable: string;
17
+ prev_step: string;
18
+ io: string;
19
+ load_failed: string;
20
+ param: string;
21
+ no: string;
22
+ message: string;
23
+ architecture: string;
24
+ calculation: string;
25
+ on: string;
26
+ error_message: string;
27
+ retry: string;
28
+ };
29
+ components: {
30
+ contains: string;
31
+ custom_column: string;
32
+ in: string;
33
+ not: string;
34
+ not_contains: string;
35
+ or: string;
36
+ previous_items: string;
37
+ next_items: string;
38
+ push_to: string;
39
+ pagination_range: string;
40
+ pagination_total: string;
41
+ unknow_error: string;
42
+ to: string;
43
+ };
44
+ metric: {
45
+ current: string;
46
+ empty: string;
47
+ max: string;
48
+ };
49
+ };
50
+ export default locale;
@@ -1,11 +1,9 @@
1
1
  import common from "./common.json";
2
2
  import components from "./components.json";
3
3
  import metric from "./metric.json";
4
-
5
- const locale = {
6
- common: common,
7
- components: components,
8
- metric: metric,
4
+ var locale = {
5
+ common: common,
6
+ components: components,
7
+ metric: metric,
9
8
  };
10
-
11
9
  export default locale;
@@ -0,0 +1,5 @@
1
+ {
2
+ "current": "Current value",
3
+ "empty": "No data in this time range",
4
+ "max": "Max"
5
+ }
@@ -0,0 +1,101 @@
1
+ declare const locales: {
2
+ "en-US": {
3
+ common: {
4
+ _action_: string;
5
+ action: string;
6
+ all: string;
7
+ cancel: string;
8
+ clear_query: string;
9
+ close: string;
10
+ contains: string;
11
+ confirm: string;
12
+ empty: string;
13
+ enable: string;
14
+ error: string;
15
+ next_step: string;
16
+ not_contains: string;
17
+ not_enable: string;
18
+ prev_step: string;
19
+ io: string;
20
+ load_failed: string;
21
+ param: string;
22
+ no: string;
23
+ message: string;
24
+ architecture: string;
25
+ calculation: string;
26
+ on: string;
27
+ error_message: string;
28
+ retry: string;
29
+ };
30
+ components: {
31
+ contains: string;
32
+ custom_column: string;
33
+ in: string;
34
+ not: string;
35
+ not_contains: string;
36
+ or: string;
37
+ previous_items: string;
38
+ next_items: string;
39
+ push_to: string;
40
+ pagination_range: string;
41
+ pagination_total: string;
42
+ unknow_error: string;
43
+ to: string;
44
+ };
45
+ metric: {
46
+ current: string;
47
+ empty: string;
48
+ max: string;
49
+ };
50
+ };
51
+ "zh-CN": {
52
+ common: {
53
+ _action_: string;
54
+ action: string;
55
+ all: string;
56
+ cancel: string;
57
+ clear_query: string;
58
+ close: string;
59
+ contains: string;
60
+ confirm: string;
61
+ empty: string;
62
+ enable: string;
63
+ error: string;
64
+ next_step: string;
65
+ not_contains: string;
66
+ not_enable: string;
67
+ prev_step: string;
68
+ io: string;
69
+ load_failed: string;
70
+ param: string;
71
+ no: string;
72
+ message: string;
73
+ architecture: string;
74
+ calculation: string;
75
+ on: string;
76
+ error_message: string;
77
+ retry: string;
78
+ };
79
+ components: {
80
+ contains: string;
81
+ custom_column: string;
82
+ in: string;
83
+ not: string;
84
+ not_contains: string;
85
+ or: string;
86
+ previous_items: string;
87
+ next_items: string;
88
+ push_to: string;
89
+ pagination_range: string;
90
+ pagination_total: string;
91
+ unknow_error: string;
92
+ to: string;
93
+ };
94
+ metric: {
95
+ current: string;
96
+ empty: string;
97
+ max: string;
98
+ };
99
+ };
100
+ };
101
+ export default locales;
@@ -1,9 +1,7 @@
1
1
  import enUS from "./en-US";
2
2
  import zhCN from "./zh-CN";
3
-
4
- const locales = {
5
- "en-US": enUS,
6
- "zh-CN": zhCN,
3
+ var locales = {
4
+ "en-US": enUS,
5
+ "zh-CN": zhCN,
7
6
  };
8
-
9
7
  export default locales;
@@ -0,0 +1,27 @@
1
+ {
2
+ "_action_": "操作",
3
+ "action": "操作",
4
+ "all": "全部",
5
+ "cancel": "取消",
6
+ "clear_query": "清空筛选条件",
7
+ "close": "关闭",
8
+ "contains": "包含",
9
+ "confirm": "确定",
10
+ "empty": "无",
11
+ "enable": "启用",
12
+ "error": "错误",
13
+ "next_step": "下一步",
14
+ "not_contains": "不包含",
15
+ "not_enable": "不启用",
16
+ "prev_step": "上一步",
17
+ "io": "I/O 总数",
18
+ "load_failed": "加载失败",
19
+ "param": "参数",
20
+ "no": "否",
21
+ "message": "信息",
22
+ "architecture": "CPU 架构",
23
+ "calculation": "计算中",
24
+ "on": "开启",
25
+ "error_message": "错误信息",
26
+ "retry": "重试"
27
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "contains": "包含",
3
+ "custom_column": "自定义列的展示和顺序",
4
+ "in": "属于",
5
+ "not": "不为",
6
+ "not_contains": "不包含",
7
+ "or": "或",
8
+ "previous_items": "前 {size} 项",
9
+ "next_items": "后 {size} 项",
10
+ "push_to": "跳转至",
11
+ "pagination_range": "第 {range1} – {range2} 项",
12
+ "pagination_total": "第 {range1} – {range2} 项,共 {total} 项",
13
+ "unknow_error": "未知错误",
14
+ "to": "至"
15
+ }
@@ -0,0 +1,50 @@
1
+ declare const locale: {
2
+ common: {
3
+ _action_: string;
4
+ action: string;
5
+ all: string;
6
+ cancel: string;
7
+ clear_query: string;
8
+ close: string;
9
+ contains: string;
10
+ confirm: string;
11
+ empty: string;
12
+ enable: string;
13
+ error: string;
14
+ next_step: string;
15
+ not_contains: string;
16
+ not_enable: string;
17
+ prev_step: string;
18
+ io: string;
19
+ load_failed: string;
20
+ param: string;
21
+ no: string;
22
+ message: string;
23
+ architecture: string;
24
+ calculation: string;
25
+ on: string;
26
+ error_message: string;
27
+ retry: string;
28
+ };
29
+ components: {
30
+ contains: string;
31
+ custom_column: string;
32
+ in: string;
33
+ not: string;
34
+ not_contains: string;
35
+ or: string;
36
+ previous_items: string;
37
+ next_items: string;
38
+ push_to: string;
39
+ pagination_range: string;
40
+ pagination_total: string;
41
+ unknow_error: string;
42
+ to: string;
43
+ };
44
+ metric: {
45
+ current: string;
46
+ empty: string;
47
+ max: string;
48
+ };
49
+ };
50
+ export default locale;
@@ -1,11 +1,9 @@
1
1
  import common from "./common.json";
2
2
  import components from "./components.json";
3
3
  import metric from "./metric.json";
4
-
5
- const locale = {
6
- common: common,
7
- components: components,
8
- metric: metric,
4
+ var locale = {
5
+ common: common,
6
+ components: components,
7
+ metric: metric,
9
8
  };
10
-
11
9
  export default locale;
@@ -0,0 +1,5 @@
1
+ {
2
+ "current": "当前值",
3
+ "empty": "该时间范围内没有数据",
4
+ "max": "最大值"
5
+ }
@@ -0,0 +1,4 @@
1
+ import { Callback, InitOptions } from "i18next";
2
+ declare const parrotI18n: import("i18next").i18n;
3
+ export default parrotI18n;
4
+ export declare const initParrotI18n: (options?: InitOptions, callback?: Callback | undefined) => void;
@@ -0,0 +1,35 @@
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
+ };
12
+ import i18next from "i18next";
13
+ import merge from "lodash.merge";
14
+ import locales from "./locales";
15
+ var defaultOptions = {
16
+ lng: "zh-CN",
17
+ fallbackLng: "en-US",
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
+ },
30
+ };
31
+ var parrotI18n = i18next.createInstance(defaultOptions);
32
+ export default parrotI18n;
33
+ export var initParrotI18n = function (options, callback) {
34
+ parrotI18n.init(merge(defaultOptions, options), callback);
35
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudtower/parrot",
3
- "version": "0.17.10",
3
+ "version": "0.17.12",
4
4
  "description": "i18n modules for cloudtower sparrow and eagle",
5
5
  "keywords": [
6
6
  "i18n",
@@ -27,6 +27,5 @@
27
27
  "ejs": "^3.1.8",
28
28
  "i18next": "^21.10.0",
29
29
  "typescript": "^4.8.4"
30
- },
31
- "gitHead": "96fce0747611802294092922e6f034c612b82ef4"
30
+ }
32
31
  }
package/dist/esm/index.js DELETED
@@ -1,236 +0,0 @@
1
- import i18next from 'i18next';
2
-
3
- var _action_$1 = "Action";
4
- var action$1 = "Action";
5
- var all$1 = "All";
6
- var cancel$1 = "Cancel";
7
- var clear_query$1 = "Clear the filter criteria";
8
- var close$1 = "Close";
9
- var contains$3 = "Contains";
10
- var confirm$1 = "Confirm";
11
- var empty$3 = "No ";
12
- var enable$1 = "Enable";
13
- var error$1 = "Error";
14
- var next_step$1 = "Next";
15
- var not_contains$3 = "Not Contains";
16
- var not_enable$1 = "Not enabled";
17
- var prev_step$1 = "Previous";
18
- var io$1 = "Total I/O";
19
- var load_failed$1 = "Failed to load";
20
- var param$1 = "Parameter";
21
- var no$1 = "No";
22
- var message$1 = "Message";
23
- var architecture$1 = "CPU Architecture";
24
- var calculation$1 = "Computing";
25
- var on$1 = "On";
26
- var error_message$1 = "Error Message";
27
- var retry$1 = "Retry";
28
- var common$1 = {
29
- _action_: _action_$1,
30
- action: action$1,
31
- all: all$1,
32
- cancel: cancel$1,
33
- clear_query: clear_query$1,
34
- close: close$1,
35
- contains: contains$3,
36
- confirm: confirm$1,
37
- empty: empty$3,
38
- enable: enable$1,
39
- error: error$1,
40
- next_step: next_step$1,
41
- not_contains: not_contains$3,
42
- not_enable: not_enable$1,
43
- prev_step: prev_step$1,
44
- io: io$1,
45
- load_failed: load_failed$1,
46
- param: param$1,
47
- no: no$1,
48
- message: message$1,
49
- architecture: architecture$1,
50
- calculation: calculation$1,
51
- on: on$1,
52
- error_message: error_message$1,
53
- retry: retry$1
54
- };
55
-
56
- var contains$2 = "Contains";
57
- var custom_column$1 = "Customize Columns & Order";
58
- var not$1 = "Not";
59
- var not_contains$2 = "Not Contains";
60
- var or$1 = "or";
61
- var previous_items$1 = "Previous {size} items";
62
- var next_items$1 = "Next {size} items";
63
- var push_to$1 = "Jump to";
64
- var pagination_range$1 = "Item {range1} – {range2}";
65
- var pagination_total$1 = "Item {range1} – {range2}, {total} in total";
66
- var unknow_error$1 = "Unknown error";
67
- var to$1 = "to";
68
- var components$1 = {
69
- contains: contains$2,
70
- custom_column: custom_column$1,
71
- "in": "belongs to",
72
- not: not$1,
73
- not_contains: not_contains$2,
74
- or: or$1,
75
- previous_items: previous_items$1,
76
- next_items: next_items$1,
77
- push_to: push_to$1,
78
- pagination_range: pagination_range$1,
79
- pagination_total: pagination_total$1,
80
- unknow_error: unknow_error$1,
81
- to: to$1
82
- };
83
-
84
- var current$1 = "Current value";
85
- var empty$2 = "No data in this time range";
86
- var max$1 = "Max";
87
- var metric$1 = {
88
- current: current$1,
89
- empty: empty$2,
90
- max: max$1
91
- };
92
-
93
- const locale$1 = {
94
- common: common$1,
95
- components: components$1,
96
- metric: metric$1
97
- };
98
-
99
- var _action_ = "操作";
100
- var action = "操作";
101
- var all = "全部";
102
- var cancel = "取消";
103
- var clear_query = "清空筛选条件";
104
- var close = "关闭";
105
- var contains$1 = "包含";
106
- var confirm = "确定";
107
- var empty$1 = "无";
108
- var enable = "启用";
109
- var error = "错误";
110
- var next_step = "下一步";
111
- var not_contains$1 = "不包含";
112
- var not_enable = "不启用";
113
- var prev_step = "上一步";
114
- var io = "I/O 总数";
115
- var load_failed = "加载失败";
116
- var param = "参数";
117
- var no = "否";
118
- var message = "信息";
119
- var architecture = "CPU 架构";
120
- var calculation = "计算中";
121
- var on = "开启";
122
- var error_message = "错误信息";
123
- var retry = "重试";
124
- var common = {
125
- _action_: _action_,
126
- action: action,
127
- all: all,
128
- cancel: cancel,
129
- clear_query: clear_query,
130
- close: close,
131
- contains: contains$1,
132
- confirm: confirm,
133
- empty: empty$1,
134
- enable: enable,
135
- error: error,
136
- next_step: next_step,
137
- not_contains: not_contains$1,
138
- not_enable: not_enable,
139
- prev_step: prev_step,
140
- io: io,
141
- load_failed: load_failed,
142
- param: param,
143
- no: no,
144
- message: message,
145
- architecture: architecture,
146
- calculation: calculation,
147
- on: on,
148
- error_message: error_message,
149
- retry: retry
150
- };
151
-
152
- var contains = "包含";
153
- var custom_column = "自定义列的展示和顺序";
154
- var not = "不为";
155
- var not_contains = "不包含";
156
- var or = "或";
157
- var previous_items = "前 {size} 项";
158
- var next_items = "后 {size} 项";
159
- var push_to = "跳转至";
160
- var pagination_range = "第 {range1} – {range2} 项";
161
- var pagination_total = "第 {range1} – {range2} 项,共 {total} 项";
162
- var unknow_error = "未知错误";
163
- var to = "至";
164
- var components = {
165
- contains: contains,
166
- custom_column: custom_column,
167
- "in": "属于",
168
- not: not,
169
- not_contains: not_contains,
170
- or: or,
171
- previous_items: previous_items,
172
- next_items: next_items,
173
- push_to: push_to,
174
- pagination_range: pagination_range,
175
- pagination_total: pagination_total,
176
- unknow_error: unknow_error,
177
- to: to
178
- };
179
-
180
- var current = "当前值";
181
- var empty = "该时间范围内没有数据";
182
- var max = "最大值";
183
- var metric = {
184
- current: current,
185
- empty: empty,
186
- max: max
187
- };
188
-
189
- const locale = {
190
- common,
191
- components,
192
- metric
193
- };
194
-
195
- const locales = {
196
- "en-US": locale$1,
197
- "zh-CN": locale
198
- };
199
-
200
- var __defProp = Object.defineProperty;
201
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
202
- var __hasOwnProp = Object.prototype.hasOwnProperty;
203
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
204
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
205
- var __spreadValues = (a, b) => {
206
- for (var prop in b || (b = {}))
207
- if (__hasOwnProp.call(b, prop))
208
- __defNormalProp(a, prop, b[prop]);
209
- if (__getOwnPropSymbols)
210
- for (var prop of __getOwnPropSymbols(b)) {
211
- if (__propIsEnum.call(b, prop))
212
- __defNormalProp(a, prop, b[prop]);
213
- }
214
- return a;
215
- };
216
- const parrotI18n = i18next.createInstance({
217
- lng: "zh-CN",
218
- fallbackLng: "en-US",
219
- interpolation: {
220
- prefix: "{",
221
- suffix: "}"
222
- },
223
- resources: {
224
- "en-US": {
225
- translation: __spreadValues({}, locales["en-US"])
226
- },
227
- "zh-CN": {
228
- translation: __spreadValues({}, locales["zh-CN"])
229
- }
230
- }
231
- });
232
- const initParrotI18n = (options, callback) => {
233
- parrotI18n.init(options, callback);
234
- };
235
-
236
- export { initParrotI18n, locales, parrotI18n };