@nocobase/client 0.9.0-alpha.1 → 0.9.0-alpha.2
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/es/antd-config-provider/index.d.ts +3 -1
- package/es/antd-config-provider/index.js +25 -6
- package/es/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/es/antd-config-provider/loadConstrueLocale.js +293 -0
- package/es/i18n/i18n.js +7 -12
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -2
- package/es/locale/en_US.d.ts +104 -28
- package/es/locale/en_US.js +104 -28
- package/es/locale/index.d.ts +201 -4
- package/es/locale/index.js +191 -58
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +12 -3
- package/es/schema-component/antd/cron/Cron.d.ts +0 -1
- package/es/schema-component/antd/cron/Cron.js +16 -19
- package/es/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/es/schema-component/antd/cron/locale/index.js +6 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +10 -6
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +24 -8
- package/es/system-settings/SystemSettingsShortcut.js +1 -1
- package/lib/antd-config-provider/index.d.ts +3 -1
- package/lib/antd-config-provider/index.js +40 -6
- package/lib/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/lib/antd-config-provider/loadConstrueLocale.js +304 -0
- package/lib/i18n/i18n.js +7 -14
- package/lib/index.d.ts +1 -1
- package/lib/index.js +13 -13
- package/lib/locale/en_US.d.ts +104 -28
- package/lib/locale/en_US.js +104 -28
- package/lib/locale/index.d.ts +201 -4
- package/lib/locale/index.js +197 -67
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +12 -3
- package/lib/schema-component/antd/cron/Cron.d.ts +0 -1
- package/lib/schema-component/antd/cron/Cron.js +19 -24
- package/lib/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/lib/schema-component/antd/cron/locale/index.js +18 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +10 -6
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +25 -8
- package/lib/system-settings/SystemSettingsShortcut.js +1 -1
- package/package.json +6 -5
|
@@ -11,11 +11,18 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
|
|
13
13
|
import { ConfigProvider, Spin } from 'antd';
|
|
14
|
-
import
|
|
14
|
+
import moment from 'moment';
|
|
15
|
+
import React, { createContext, useContext } from 'react';
|
|
15
16
|
import { useTranslation } from 'react-i18next';
|
|
16
17
|
import { useAPIClient, useRequest } from '../api-client';
|
|
17
|
-
import
|
|
18
|
+
import { loadConstrueLocale } from './loadConstrueLocale';
|
|
19
|
+
export var AppLangContext = /*#__PURE__*/createContext({});
|
|
20
|
+
export var useAppLangContext = function useAppLangContext() {
|
|
21
|
+
return useContext(AppLangContext);
|
|
22
|
+
};
|
|
18
23
|
export function AntdConfigProvider(props) {
|
|
24
|
+
var _data$data9;
|
|
25
|
+
|
|
19
26
|
var remoteLocale = props.remoteLocale,
|
|
20
27
|
others = _objectWithoutProperties(props, _excluded);
|
|
21
28
|
|
|
@@ -28,7 +35,7 @@ export function AntdConfigProvider(props) {
|
|
|
28
35
|
url: 'app:getLang'
|
|
29
36
|
}, {
|
|
30
37
|
onSuccess: function onSuccess(data) {
|
|
31
|
-
var _data$data;
|
|
38
|
+
var _data$data, _data$data4, _data$data7, _data$data8;
|
|
32
39
|
|
|
33
40
|
var locale = api.auth.locale;
|
|
34
41
|
|
|
@@ -38,18 +45,30 @@ export function AntdConfigProvider(props) {
|
|
|
38
45
|
api.auth.setLocale(data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.lang);
|
|
39
46
|
i18n.changeLanguage(data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.lang);
|
|
40
47
|
}
|
|
48
|
+
|
|
49
|
+
Object.keys((data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : _data$data4.resources) || {}).forEach(function (key) {
|
|
50
|
+
var _data$data5, _data$data6;
|
|
51
|
+
|
|
52
|
+
i18n.addResources(data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : _data$data5.lang, key, (data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : _data$data6.resources[key]) || {});
|
|
53
|
+
});
|
|
54
|
+
loadConstrueLocale(data === null || data === void 0 ? void 0 : data.data);
|
|
55
|
+
moment.locale(data === null || data === void 0 ? void 0 : (_data$data7 = data.data) === null || _data$data7 === void 0 ? void 0 : _data$data7.moment);
|
|
56
|
+
window['cronLocale'] = data === null || data === void 0 ? void 0 : (_data$data8 = data.data) === null || _data$data8 === void 0 ? void 0 : _data$data8.cron;
|
|
41
57
|
},
|
|
42
58
|
manual: !remoteLocale
|
|
43
59
|
}),
|
|
60
|
+
data = _useRequest.data,
|
|
44
61
|
loading = _useRequest.loading;
|
|
45
62
|
|
|
46
63
|
if (loading) {
|
|
47
64
|
return /*#__PURE__*/React.createElement(Spin, null);
|
|
48
65
|
}
|
|
49
66
|
|
|
50
|
-
return /*#__PURE__*/React.createElement(
|
|
67
|
+
return /*#__PURE__*/React.createElement(AppLangContext.Provider, {
|
|
68
|
+
value: data === null || data === void 0 ? void 0 : data.data
|
|
69
|
+
}, /*#__PURE__*/React.createElement(ConfigProvider, _objectSpread(_objectSpread({
|
|
51
70
|
dropdownMatchSelectWidth: false
|
|
52
71
|
}, others), {}, {
|
|
53
|
-
locale:
|
|
54
|
-
}), props.children);
|
|
72
|
+
locale: (data === null || data === void 0 ? void 0 : (_data$data9 = data.data) === null || _data$data9 === void 0 ? void 0 : _data$data9.antd) || {}
|
|
73
|
+
}), props.children));
|
|
55
74
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const loadConstrueLocale: (data: any) => void;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4
|
+
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
|
|
7
|
+
import cronstrue from 'cronstrue';
|
|
8
|
+
|
|
9
|
+
var CronstrueLocale = /*#__PURE__*/function () {
|
|
10
|
+
function CronstrueLocale(data) {
|
|
11
|
+
_classCallCheck(this, CronstrueLocale);
|
|
12
|
+
|
|
13
|
+
this.data = void 0;
|
|
14
|
+
this.data = data;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
_createClass(CronstrueLocale, [{
|
|
18
|
+
key: "atX0SecondsPastTheMinuteGt20",
|
|
19
|
+
value: function atX0SecondsPastTheMinuteGt20() {
|
|
20
|
+
return this.data['atX0SecondsPastTheMinuteGt20'];
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
key: "atX0MinutesPastTheHourGt20",
|
|
24
|
+
value: function atX0MinutesPastTheHourGt20() {
|
|
25
|
+
return this.data['atX0MinutesPastTheHourGt20'];
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
key: "commaMonthX0ThroughMonthX1",
|
|
29
|
+
value: function commaMonthX0ThroughMonthX1() {
|
|
30
|
+
return this.data['commaMonthX0ThroughMonthX1'];
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
key: "commaYearX0ThroughYearX1",
|
|
34
|
+
value: function commaYearX0ThroughYearX1() {
|
|
35
|
+
return this.data['commaYearX0ThroughYearX1'];
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
key: "use24HourTimeFormatByDefault",
|
|
39
|
+
value: function use24HourTimeFormatByDefault() {
|
|
40
|
+
return this.data['use24HourTimeFormatByDefault'];
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
key: "anErrorOccuredWhenGeneratingTheExpressionD",
|
|
44
|
+
value: function anErrorOccuredWhenGeneratingTheExpressionD() {
|
|
45
|
+
return this.data['anErrorOccuredWhenGeneratingTheExpressionD'];
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
key: "everyMinute",
|
|
49
|
+
value: function everyMinute() {
|
|
50
|
+
return this.data['everyMinute'];
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
key: "everyHour",
|
|
54
|
+
value: function everyHour() {
|
|
55
|
+
return this.data['everyHour'];
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "atSpace",
|
|
59
|
+
value: function atSpace() {
|
|
60
|
+
return this.data['atSpace'];
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
key: "everyMinuteBetweenX0AndX1",
|
|
64
|
+
value: function everyMinuteBetweenX0AndX1() {
|
|
65
|
+
return this.data['everyMinuteBetweenX0AndX1'];
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
key: "at",
|
|
69
|
+
value: function at() {
|
|
70
|
+
return this.data['at'];
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: "spaceAnd",
|
|
74
|
+
value: function spaceAnd() {
|
|
75
|
+
return this.data['spaceAnd'];
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "everySecond",
|
|
79
|
+
value: function everySecond() {
|
|
80
|
+
return this.data['everySecond'];
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
key: "everyX0Seconds",
|
|
84
|
+
value: function everyX0Seconds() {
|
|
85
|
+
return this.data['everyX0Seconds'];
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "secondsX0ThroughX1PastTheMinute",
|
|
89
|
+
value: function secondsX0ThroughX1PastTheMinute() {
|
|
90
|
+
return this.data['secondsX0ThroughX1PastTheMinute'];
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "atX0SecondsPastTheMinute",
|
|
94
|
+
value: function atX0SecondsPastTheMinute() {
|
|
95
|
+
return this.data['atX0SecondsPastTheMinute'];
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: "everyX0Minutes",
|
|
99
|
+
value: function everyX0Minutes() {
|
|
100
|
+
return this.data['everyX0Minutes'];
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "minutesX0ThroughX1PastTheHour",
|
|
104
|
+
value: function minutesX0ThroughX1PastTheHour() {
|
|
105
|
+
return this.data['minutesX0ThroughX1PastTheHour'];
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
key: "atX0MinutesPastTheHour",
|
|
109
|
+
value: function atX0MinutesPastTheHour() {
|
|
110
|
+
return this.data['atX0MinutesPastTheHour'];
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "everyX0Hours",
|
|
114
|
+
value: function everyX0Hours() {
|
|
115
|
+
return this.data['everyX0Hours'];
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "betweenX0AndX1",
|
|
119
|
+
value: function betweenX0AndX1() {
|
|
120
|
+
return this.data['betweenX0AndX1'];
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "atX0",
|
|
124
|
+
value: function atX0() {
|
|
125
|
+
return this.data['atX0'];
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "commaEveryDay",
|
|
129
|
+
value: function commaEveryDay() {
|
|
130
|
+
return this.data['commaEveryDay'];
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
key: "commaEveryX0DaysOfTheWeek",
|
|
134
|
+
value: function commaEveryX0DaysOfTheWeek() {
|
|
135
|
+
return this.data['commaEveryX0DaysOfTheWeek'];
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
key: "commaX0ThroughX1",
|
|
139
|
+
value: function commaX0ThroughX1() {
|
|
140
|
+
return this.data['commaX0ThroughX1'];
|
|
141
|
+
}
|
|
142
|
+
}, {
|
|
143
|
+
key: "commaAndX0ThroughX1",
|
|
144
|
+
value: function commaAndX0ThroughX1() {
|
|
145
|
+
return this.data['commaAndX0ThroughX1'];
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
key: "first",
|
|
149
|
+
value: function first() {
|
|
150
|
+
return this.data['first'];
|
|
151
|
+
}
|
|
152
|
+
}, {
|
|
153
|
+
key: "second",
|
|
154
|
+
value: function second() {
|
|
155
|
+
return this.data['second'];
|
|
156
|
+
}
|
|
157
|
+
}, {
|
|
158
|
+
key: "third",
|
|
159
|
+
value: function third() {
|
|
160
|
+
return this.data['third'];
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
163
|
+
key: "fourth",
|
|
164
|
+
value: function fourth() {
|
|
165
|
+
return this.data['fourth'];
|
|
166
|
+
}
|
|
167
|
+
}, {
|
|
168
|
+
key: "fifth",
|
|
169
|
+
value: function fifth() {
|
|
170
|
+
return this.data['fifth'];
|
|
171
|
+
}
|
|
172
|
+
}, {
|
|
173
|
+
key: "commaOnThe",
|
|
174
|
+
value: function commaOnThe() {
|
|
175
|
+
return this.data['commaOnThe'];
|
|
176
|
+
}
|
|
177
|
+
}, {
|
|
178
|
+
key: "spaceX0OfTheMonth",
|
|
179
|
+
value: function spaceX0OfTheMonth() {
|
|
180
|
+
return this.data['spaceX0OfTheMonth'];
|
|
181
|
+
}
|
|
182
|
+
}, {
|
|
183
|
+
key: "lastDay",
|
|
184
|
+
value: function lastDay() {
|
|
185
|
+
return this.data['lastDay'];
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
188
|
+
key: "commaOnTheLastX0OfTheMonth",
|
|
189
|
+
value: function commaOnTheLastX0OfTheMonth() {
|
|
190
|
+
return this.data['commaOnTheLastX0OfTheMonth'];
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
key: "commaOnlyOnX0",
|
|
194
|
+
value: function commaOnlyOnX0() {
|
|
195
|
+
return this.data['commaOnlyOnX0'];
|
|
196
|
+
}
|
|
197
|
+
}, {
|
|
198
|
+
key: "commaAndOnX0",
|
|
199
|
+
value: function commaAndOnX0() {
|
|
200
|
+
return this.data['commaAndOnX0'];
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
key: "commaEveryX0Months",
|
|
204
|
+
value: function commaEveryX0Months() {
|
|
205
|
+
return this.data['commaEveryX0Months'];
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
key: "commaOnlyInX0",
|
|
209
|
+
value: function commaOnlyInX0() {
|
|
210
|
+
return this.data['commaOnlyInX0'];
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
key: "commaOnTheLastDayOfTheMonth",
|
|
214
|
+
value: function commaOnTheLastDayOfTheMonth() {
|
|
215
|
+
return this.data['commaOnTheLastDayOfTheMonth'];
|
|
216
|
+
}
|
|
217
|
+
}, {
|
|
218
|
+
key: "commaOnTheLastWeekdayOfTheMonth",
|
|
219
|
+
value: function commaOnTheLastWeekdayOfTheMonth() {
|
|
220
|
+
return this.data['commaOnTheLastWeekdayOfTheMonth'];
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
key: "commaDaysBeforeTheLastDayOfTheMonth",
|
|
224
|
+
value: function commaDaysBeforeTheLastDayOfTheMonth() {
|
|
225
|
+
return this.data['commaDaysBeforeTheLastDayOfTheMonth'];
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
key: "firstWeekday",
|
|
229
|
+
value: function firstWeekday() {
|
|
230
|
+
return this.data['firstWeekday'];
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
key: "weekdayNearestDayX0",
|
|
234
|
+
value: function weekdayNearestDayX0() {
|
|
235
|
+
return this.data['weekdayNearestDayX0'];
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
key: "commaOnTheX0OfTheMonth",
|
|
239
|
+
value: function commaOnTheX0OfTheMonth() {
|
|
240
|
+
return this.data['commaOnTheX0OfTheMonth'];
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "commaEveryX0Days",
|
|
244
|
+
value: function commaEveryX0Days() {
|
|
245
|
+
return this.data['commaEveryX0Days'];
|
|
246
|
+
}
|
|
247
|
+
}, {
|
|
248
|
+
key: "commaBetweenDayX0AndX1OfTheMonth",
|
|
249
|
+
value: function commaBetweenDayX0AndX1OfTheMonth() {
|
|
250
|
+
return this.data['commaBetweenDayX0AndX1OfTheMonth'];
|
|
251
|
+
}
|
|
252
|
+
}, {
|
|
253
|
+
key: "commaOnDayX0OfTheMonth",
|
|
254
|
+
value: function commaOnDayX0OfTheMonth() {
|
|
255
|
+
return this.data['commaOnDayX0OfTheMonth'];
|
|
256
|
+
}
|
|
257
|
+
}, {
|
|
258
|
+
key: "commaEveryHour",
|
|
259
|
+
value: function commaEveryHour() {
|
|
260
|
+
return this.data['commaEveryHour'];
|
|
261
|
+
}
|
|
262
|
+
}, {
|
|
263
|
+
key: "commaEveryX0Years",
|
|
264
|
+
value: function commaEveryX0Years() {
|
|
265
|
+
return this.data['commaEveryX0Years'];
|
|
266
|
+
}
|
|
267
|
+
}, {
|
|
268
|
+
key: "commaStartingX0",
|
|
269
|
+
value: function commaStartingX0() {
|
|
270
|
+
return this.data['commaStartingX0'];
|
|
271
|
+
}
|
|
272
|
+
}, {
|
|
273
|
+
key: "daysOfTheWeek",
|
|
274
|
+
value: function daysOfTheWeek() {
|
|
275
|
+
return this.data['daysOfTheWeek'];
|
|
276
|
+
}
|
|
277
|
+
}, {
|
|
278
|
+
key: "monthsOfTheYear",
|
|
279
|
+
value: function monthsOfTheYear() {
|
|
280
|
+
return this.data['monthsOfTheYear'];
|
|
281
|
+
}
|
|
282
|
+
}]);
|
|
283
|
+
|
|
284
|
+
return CronstrueLocale;
|
|
285
|
+
}();
|
|
286
|
+
|
|
287
|
+
export var loadConstrueLocale = function loadConstrueLocale(data) {
|
|
288
|
+
cronstrue.initialize({
|
|
289
|
+
load: function load(availableLocales) {
|
|
290
|
+
availableLocales[data === null || data === void 0 ? void 0 : data.lang] = new CronstrueLocale(data === null || data === void 0 ? void 0 : data.cronstrue);
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
};
|
package/es/i18n/i18n.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
|
-
import moment from 'moment';
|
|
3
2
|
import { initReactI18next } from 'react-i18next';
|
|
4
3
|
import locale from '../locale';
|
|
5
4
|
|
|
@@ -10,26 +9,22 @@ var resources = {};
|
|
|
10
9
|
Object.keys(locale).forEach(function (lang) {
|
|
11
10
|
resources[lang] = locale[lang].resources;
|
|
12
11
|
});
|
|
13
|
-
i18n.use(
|
|
12
|
+
i18n // .use(Backend)
|
|
13
|
+
.use(initReactI18next).init({
|
|
14
14
|
lng: localStorage.getItem('NOCOBASE_LOCALE') || 'en-US',
|
|
15
15
|
// debug: true,
|
|
16
16
|
defaultNS: 'client',
|
|
17
|
+
// backend: {
|
|
18
|
+
// // for all available options read the backend's repository readme file
|
|
19
|
+
// loadPath: '/api/locales/{{lng}}/{{ns}}.json',
|
|
20
|
+
// },
|
|
17
21
|
// parseMissingKeyHandler: (key) => {
|
|
18
22
|
// console.log('parseMissingKeyHandler', `'${key}': '${key}',`);
|
|
19
23
|
// return key;
|
|
20
24
|
// },
|
|
21
25
|
// ns: ['client'],
|
|
22
|
-
resources:
|
|
26
|
+
resources: {}
|
|
23
27
|
});
|
|
24
|
-
|
|
25
|
-
function setMomentLng(language) {
|
|
26
|
-
var lng = locale[language || 'en-US'].moment || 'en';
|
|
27
|
-
log(lng);
|
|
28
|
-
moment.locale(lng);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
setMomentLng(localStorage.getItem('NOCOBASE_LOCALE'));
|
|
32
28
|
i18n.on('languageChanged', function (lng) {
|
|
33
29
|
localStorage.setItem('NOCOBASE_LOCALE', lng);
|
|
34
|
-
setMomentLng(lng);
|
|
35
30
|
});
|
package/es/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import './global.less';
|
|
|
3
3
|
export * from './acl';
|
|
4
4
|
export * from './antd-config-provider';
|
|
5
5
|
export * from './api-client';
|
|
6
|
+
export * from './appInfo';
|
|
6
7
|
export * from './application';
|
|
7
8
|
export * from './async-data-provider';
|
|
8
9
|
export * from './block-provider';
|
|
@@ -25,4 +26,3 @@ export * from './schema-templates';
|
|
|
25
26
|
export * from './settings-form';
|
|
26
27
|
export * from './system-settings';
|
|
27
28
|
export * from './user';
|
|
28
|
-
export * from './appInfo';
|
package/es/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import './global.less';
|
|
|
3
3
|
export * from './acl';
|
|
4
4
|
export * from './antd-config-provider';
|
|
5
5
|
export * from './api-client';
|
|
6
|
+
export * from './appInfo';
|
|
6
7
|
export * from './application';
|
|
7
8
|
export * from './async-data-provider';
|
|
8
9
|
export * from './block-provider';
|
|
@@ -24,5 +25,4 @@ export * from './schema-settings';
|
|
|
24
25
|
export * from './schema-templates';
|
|
25
26
|
export * from './settings-form';
|
|
26
27
|
export * from './system-settings';
|
|
27
|
-
export * from './user';
|
|
28
|
-
export * from './appInfo';
|
|
28
|
+
export * from './user';
|