@campus-admin/locale 1.0.0 → 2.0.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/README.md +2 -67
- package/dist/en-US.d.ts +3 -0
- package/dist/index.d.ts +342 -50
- package/dist/index.js +312 -309
- package/dist/zh-CN.d.ts +167 -0
- package/package.json +10 -37
- package/dist/format.d.ts +0 -22
- package/dist/index.umd.cjs +0 -1
- package/dist/lang/en-US.d.ts +0 -9
- package/dist/lang/zh-CN.d.ts +0 -13
- package/dist/types.d.ts +0 -54
package/dist/index.js
CHANGED
|
@@ -1,331 +1,334 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// packages/locale/src/en-US.ts
|
|
2
|
+
var e = { campus: {
|
|
3
|
+
notify: {
|
|
4
|
+
success: "Success",
|
|
5
|
+
info: "Notice",
|
|
6
|
+
warning: "Warning",
|
|
7
|
+
error: "Error"
|
|
8
|
+
},
|
|
4
9
|
common: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
cancel: "取消",
|
|
11
|
-
processing: "处理中…",
|
|
12
|
-
back: "返回",
|
|
13
|
-
expand: "展开",
|
|
14
|
-
collapse: "收起"
|
|
10
|
+
ok: "OK",
|
|
11
|
+
cancel: "Cancel",
|
|
12
|
+
confirm: "Confirm",
|
|
13
|
+
tip: "Notice",
|
|
14
|
+
loading: "Loading…"
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
login: {
|
|
17
|
+
title: "Sign in",
|
|
18
|
+
username: "Account",
|
|
19
|
+
password: "Password",
|
|
20
|
+
submit: "Sign in",
|
|
21
|
+
failed: "Sign-in failed",
|
|
22
|
+
required: "Please enter {label}"
|
|
22
23
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
auth: {
|
|
25
|
+
tabAccount: "Account sign-in",
|
|
26
|
+
tabWechat: "WeChat sign-in",
|
|
27
|
+
tabRegister: "Sign up",
|
|
28
|
+
tabForgot: "Reset password",
|
|
29
|
+
backLogin: "Back to sign-in",
|
|
30
|
+
accountPlaceholder: "Phone number or username",
|
|
31
|
+
passwordPlaceholder: "Password",
|
|
32
|
+
captcha: "Captcha",
|
|
33
|
+
captchaPlaceholder: "Captcha",
|
|
34
|
+
captchaRefresh: "Hard to read? Click to refresh",
|
|
35
|
+
captchaFailed: "Failed to load the captcha. Click to retry",
|
|
36
|
+
captchaRequired: "Please enter the captcha",
|
|
37
|
+
wechatHint: "Scan with WeChat to sign in",
|
|
38
|
+
wechatNote: "This is a placeholder; scan sign-in is not available yet",
|
|
39
|
+
wechatMountFailed: "Failed to load the QR code",
|
|
40
|
+
wechatRetry: "Retry",
|
|
41
|
+
qrcodeAlt: "QR code",
|
|
42
|
+
helpTitle: "Having trouble signing in?",
|
|
43
|
+
help1: "For your first sign-in, use the account and initial password issued by your administrator.",
|
|
44
|
+
help2: "If you forgot your password, you can {forgot} yourself; if that is unavailable, contact your administrator.",
|
|
45
|
+
help3: "If your account is disabled or you lack permission, contact the school administrator.",
|
|
46
|
+
help4: "Use a recent version of Chrome, Edge or another modern browser.",
|
|
47
|
+
findPassword: "reset it",
|
|
48
|
+
forgotLink: "Forgot password?",
|
|
49
|
+
registerLink: "Sign up",
|
|
50
|
+
phone: "Phone number",
|
|
51
|
+
phonePlaceholder: "Enter your phone number",
|
|
52
|
+
phoneInvalid: "Invalid phone number",
|
|
53
|
+
account: "Phone number or username",
|
|
54
|
+
accountRequired: "Please enter your phone number or username",
|
|
55
|
+
smsCode: "SMS code",
|
|
56
|
+
smsPlaceholder: "SMS code",
|
|
57
|
+
getCode: "Get code",
|
|
58
|
+
resend: "Resend in {n}s",
|
|
59
|
+
smsSent: "Code sent",
|
|
60
|
+
smsNeedPhone: "Enter your phone number first",
|
|
61
|
+
smsNeedAccount: "Enter your phone number or username first",
|
|
62
|
+
registerPassword: "Password",
|
|
63
|
+
registerPasswordPlaceholder: "Set a password",
|
|
64
|
+
newPasswordPlaceholder: "New password",
|
|
65
|
+
confirmPlaceholder: "Enter the password again",
|
|
66
|
+
passwordPolicy: "At least 8 characters, with both letters and digits",
|
|
67
|
+
sessionExpired: "Your session has expired. Please sign in again.",
|
|
68
|
+
passwordMismatch: "The two passwords do not match",
|
|
69
|
+
agreePrefix: "I have read and agree to",
|
|
70
|
+
agreeRequired: "Please read and accept the agreements first",
|
|
71
|
+
registerOk: "Signed up. Please sign in with your new account",
|
|
72
|
+
resetOk: "Password reset. Please sign in with the new password",
|
|
73
|
+
previewNote: "Preview: you can fill in the form and see validation, but nothing is submitted.",
|
|
74
|
+
unavailableTitle: "Not available",
|
|
75
|
+
unavailableDesc: "This feature is not provided by the platform. Contact your administrator."
|
|
29
76
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
77
|
+
header: {
|
|
78
|
+
language: "Language",
|
|
79
|
+
theme: "Theme",
|
|
80
|
+
logout: "Sign out",
|
|
81
|
+
myAccount: "My account",
|
|
82
|
+
search: "Search",
|
|
83
|
+
shortcuts: "Shortcuts",
|
|
84
|
+
fullscreen: "Fullscreen",
|
|
85
|
+
exitFullscreen: "Exit fullscreen",
|
|
86
|
+
notifications: "Notifications",
|
|
87
|
+
assistant: "Assistant",
|
|
88
|
+
appearance: "Appearance",
|
|
89
|
+
settings: "Settings",
|
|
90
|
+
account: "Account"
|
|
34
91
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
92
|
+
settings: {
|
|
93
|
+
title: "Settings",
|
|
94
|
+
themeMode: "Theme mode",
|
|
95
|
+
themeColor: "Theme color",
|
|
96
|
+
themeColorCustom: "Custom color",
|
|
97
|
+
themeColorReset: "Restore site default",
|
|
98
|
+
boxStyle: "Box style",
|
|
99
|
+
boxBorder: "Border",
|
|
100
|
+
boxShadow: "Shadow",
|
|
101
|
+
close: "Close"
|
|
40
102
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
103
|
+
mode: {
|
|
104
|
+
light: "Light",
|
|
105
|
+
dark: "Dark",
|
|
106
|
+
auto: "Auto"
|
|
45
107
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
108
|
+
side: {
|
|
109
|
+
home: "Home",
|
|
110
|
+
collapse: "Collapse pages",
|
|
111
|
+
expand: "Expand pages",
|
|
112
|
+
hideText: "Hide menu text",
|
|
113
|
+
showText: "Show menu text",
|
|
114
|
+
openMenu: "Open menu",
|
|
115
|
+
closeMenu: "Close menu"
|
|
54
116
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
117
|
+
breadcrumb: { current: "Current location: " },
|
|
118
|
+
tabs: {
|
|
119
|
+
refresh: "Refresh",
|
|
120
|
+
close: "Close",
|
|
121
|
+
closeLeft: "Close left",
|
|
122
|
+
closeRight: "Close right",
|
|
123
|
+
closeOthers: "Close others",
|
|
124
|
+
closeAll: "Close all",
|
|
125
|
+
fullscreen: "Fullscreen content",
|
|
126
|
+
exitFullscreen: "Exit fullscreen"
|
|
127
|
+
},
|
|
128
|
+
table: {
|
|
129
|
+
search: "Search",
|
|
130
|
+
reset: "Reset",
|
|
131
|
+
empty: "No data",
|
|
132
|
+
loadFailed: "Failed to load data",
|
|
133
|
+
retry: "Retry",
|
|
134
|
+
total: "{total} in total",
|
|
135
|
+
refresh: "Refresh"
|
|
62
136
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
prevWeek: "上一周",
|
|
68
|
-
nextWeek: "下一周",
|
|
69
|
-
thisWeek: "本周",
|
|
70
|
-
week: "第 {week} 周",
|
|
71
|
-
personalSubtitle: "林老师 · 语文",
|
|
72
|
-
classSubtitle: "班级教学安排",
|
|
73
|
-
term: "2026–2027 学年 · 第一学期",
|
|
74
|
-
classLabel: "选择班级",
|
|
75
|
-
weekCount: "本周 {count} 节课",
|
|
76
|
-
caption: "{range} 教学课表",
|
|
77
|
-
periodHeader: "时段 / 节次",
|
|
78
|
-
hint: "点击课程查看详情",
|
|
79
|
-
detail: "{date} {time},授课教师:林老师。请提前准备教学资料。"
|
|
137
|
+
form: {
|
|
138
|
+
required: "Please enter {label}",
|
|
139
|
+
submit: "Submit",
|
|
140
|
+
reset: "Reset"
|
|
80
141
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
142
|
+
chart: {
|
|
143
|
+
compact: "latin",
|
|
144
|
+
empty: "No data",
|
|
145
|
+
loading: "Loading data…",
|
|
146
|
+
total: "Total",
|
|
147
|
+
category: "Category",
|
|
148
|
+
value: "Value",
|
|
149
|
+
percent: "Share",
|
|
150
|
+
summaryLine: "{title} line chart, {categories} categories, {series} series.",
|
|
151
|
+
summaryBar: "{title} bar chart, {categories} categories, {series} series.",
|
|
152
|
+
summarySeries: "{name}: min {min}, max {max}, latest {last} ({category}).",
|
|
153
|
+
summaryPie: "{title} share chart, {count} items, total {total}.",
|
|
154
|
+
summaryPieItem: "{name} {value}, {percent}.",
|
|
155
|
+
summarySpark: "{title} trend, {count} points, min {min}, max {max}, latest {last}.",
|
|
156
|
+
summaryGauge: "{title}: {value} of {max}, {percent}."
|
|
157
|
+
},
|
|
158
|
+
error: {
|
|
159
|
+
forbidden: "You have no access to this page",
|
|
160
|
+
notFound: "Page not found",
|
|
161
|
+
backHome: "Back to home"
|
|
97
162
|
}
|
|
98
|
-
} },
|
|
163
|
+
} }, t = { campus: {
|
|
164
|
+
notify: {
|
|
165
|
+
success: "成功",
|
|
166
|
+
info: "提示",
|
|
167
|
+
warning: "警告",
|
|
168
|
+
error: "错误"
|
|
169
|
+
},
|
|
99
170
|
common: {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
cancel: "Cancel",
|
|
106
|
-
processing: "Processing…",
|
|
107
|
-
back: "Back",
|
|
108
|
-
expand: "Expand",
|
|
109
|
-
collapse: "Collapse"
|
|
171
|
+
ok: "确定",
|
|
172
|
+
cancel: "取消",
|
|
173
|
+
confirm: "确认",
|
|
174
|
+
tip: "提示",
|
|
175
|
+
loading: "加载中…"
|
|
110
176
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
177
|
+
login: {
|
|
178
|
+
title: "登录",
|
|
179
|
+
username: "账号",
|
|
180
|
+
password: "密码",
|
|
181
|
+
submit: "登录",
|
|
182
|
+
failed: "登录失败",
|
|
183
|
+
required: "请输入{label}"
|
|
117
184
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
185
|
+
auth: {
|
|
186
|
+
tabAccount: "账号登录",
|
|
187
|
+
tabWechat: "微信登录",
|
|
188
|
+
tabRegister: "注册账号",
|
|
189
|
+
tabForgot: "找回密码",
|
|
190
|
+
backLogin: "返回登录",
|
|
191
|
+
accountPlaceholder: "手机号或用户名",
|
|
192
|
+
passwordPlaceholder: "密码",
|
|
193
|
+
captcha: "图形验证码",
|
|
194
|
+
captchaPlaceholder: "图形验证码",
|
|
195
|
+
captchaRefresh: "看不清?点击刷新验证码",
|
|
196
|
+
captchaFailed: "验证码加载失败,点击重试",
|
|
197
|
+
captchaRequired: "请输入图形验证码",
|
|
198
|
+
wechatHint: "请使用微信扫码登录",
|
|
199
|
+
wechatNote: "当前为界面占位,暂不支持扫码登录",
|
|
200
|
+
wechatMountFailed: "二维码加载失败",
|
|
201
|
+
wechatRetry: "重试",
|
|
202
|
+
qrcodeAlt: "二维码",
|
|
203
|
+
helpTitle: "登录遇到问题?",
|
|
204
|
+
help1: "首次登录请使用管理员为您开通的账号和初始密码。",
|
|
205
|
+
help2: "忘记密码可通过{forgot}自行重置;未开通该功能时请联系管理员。",
|
|
206
|
+
help3: "账号被停用或提示无权限时,请联系学校管理员处理。",
|
|
207
|
+
help4: "建议使用最新版 Chrome、Edge 等现代浏览器访问。",
|
|
208
|
+
findPassword: "找回密码",
|
|
209
|
+
forgotLink: "忘记密码?",
|
|
210
|
+
registerLink: "注册账号",
|
|
211
|
+
phone: "手机号",
|
|
212
|
+
phonePlaceholder: "请输入手机号",
|
|
213
|
+
phoneInvalid: "手机号格式不正确",
|
|
214
|
+
account: "手机号或用户名",
|
|
215
|
+
accountRequired: "请输入手机号或用户名",
|
|
216
|
+
smsCode: "短信验证码",
|
|
217
|
+
smsPlaceholder: "短信验证码",
|
|
218
|
+
getCode: "获取验证码",
|
|
219
|
+
resend: "{n}秒后重发",
|
|
220
|
+
smsSent: "验证码已发送",
|
|
221
|
+
smsNeedPhone: "请先填写手机号",
|
|
222
|
+
smsNeedAccount: "请先填写手机号或用户名",
|
|
223
|
+
registerPassword: "登录密码",
|
|
224
|
+
registerPasswordPlaceholder: "请设置登录密码",
|
|
225
|
+
newPasswordPlaceholder: "请输入新密码",
|
|
226
|
+
confirmPlaceholder: "请再次输入密码",
|
|
227
|
+
passwordPolicy: "密码至少 8 位,且同时包含字母和数字",
|
|
228
|
+
sessionExpired: "登录已失效,请重新登录",
|
|
229
|
+
passwordMismatch: "两次输入的密码不一致",
|
|
230
|
+
agreePrefix: "我已阅读并同意",
|
|
231
|
+
agreeRequired: "请先阅读并同意协议",
|
|
232
|
+
registerOk: "注册成功,请使用新账号登录",
|
|
233
|
+
resetOk: "密码已重置,请使用新密码登录",
|
|
234
|
+
previewNote: "预览模式:可以填写并查看校验,但不会真正提交。",
|
|
235
|
+
unavailableTitle: "该功能未开通",
|
|
236
|
+
unavailableDesc: "当前平台没有提供此功能,请联系管理员。"
|
|
124
237
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
238
|
+
header: {
|
|
239
|
+
language: "语言",
|
|
240
|
+
theme: "主题",
|
|
241
|
+
logout: "退出登录",
|
|
242
|
+
myAccount: "我的账户",
|
|
243
|
+
search: "搜索",
|
|
244
|
+
shortcuts: "便捷菜单",
|
|
245
|
+
fullscreen: "全屏",
|
|
246
|
+
exitFullscreen: "退出全屏",
|
|
247
|
+
notifications: "通知",
|
|
248
|
+
assistant: "助手",
|
|
249
|
+
appearance: "外观",
|
|
250
|
+
settings: "设置",
|
|
251
|
+
account: "账号"
|
|
129
252
|
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
253
|
+
settings: {
|
|
254
|
+
title: "设置",
|
|
255
|
+
themeMode: "主题模式",
|
|
256
|
+
themeColor: "主题色",
|
|
257
|
+
themeColorCustom: "自定义颜色",
|
|
258
|
+
themeColorReset: "恢复站点默认",
|
|
259
|
+
boxStyle: "盒子样式",
|
|
260
|
+
boxBorder: "边框",
|
|
261
|
+
boxShadow: "阴影",
|
|
262
|
+
close: "关闭"
|
|
135
263
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
264
|
+
mode: {
|
|
265
|
+
light: "浅色",
|
|
266
|
+
dark: "深色",
|
|
267
|
+
auto: "自动"
|
|
140
268
|
},
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
269
|
+
side: {
|
|
270
|
+
home: "首页",
|
|
271
|
+
collapse: "收起页面栏",
|
|
272
|
+
expand: "展开页面栏",
|
|
273
|
+
hideText: "隐藏菜单文字",
|
|
274
|
+
showText: "显示菜单文字",
|
|
275
|
+
openMenu: "打开菜单",
|
|
276
|
+
closeMenu: "关闭菜单"
|
|
149
277
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
278
|
+
breadcrumb: { current: "当前位置:" },
|
|
279
|
+
tabs: {
|
|
280
|
+
refresh: "刷新当前",
|
|
281
|
+
close: "关闭当前",
|
|
282
|
+
closeLeft: "关闭左侧",
|
|
283
|
+
closeRight: "关闭右侧",
|
|
284
|
+
closeOthers: "关闭其他",
|
|
285
|
+
closeAll: "关闭全部",
|
|
286
|
+
fullscreen: "内容全屏",
|
|
287
|
+
exitFullscreen: "退出全屏"
|
|
157
288
|
},
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
personalSubtitle: "Ms. Lin · Chinese",
|
|
167
|
-
classSubtitle: "Class teaching plan",
|
|
168
|
-
term: "2026–2027 · First semester",
|
|
169
|
-
classLabel: "Select class",
|
|
170
|
-
weekCount: "{count} lessons this week",
|
|
171
|
-
caption: "{range} timetable",
|
|
172
|
-
periodHeader: "Period",
|
|
173
|
-
hint: "Click a lesson for details",
|
|
174
|
-
detail: "{date} {time}. Teacher: Ms. Lin. Please prepare your materials in advance."
|
|
289
|
+
table: {
|
|
290
|
+
search: "查询",
|
|
291
|
+
reset: "重置",
|
|
292
|
+
empty: "暂无数据",
|
|
293
|
+
loadFailed: "数据加载失败",
|
|
294
|
+
retry: "重试",
|
|
295
|
+
total: "共 {total} 条",
|
|
296
|
+
refresh: "刷新"
|
|
175
297
|
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
} }
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
i = new Intl.DateTimeFormat(void 0, t);
|
|
202
|
-
}
|
|
203
|
-
return o.set(n, i), i;
|
|
204
|
-
}
|
|
205
|
-
function c(e, t = "short") {
|
|
206
|
-
let n = s(e, { weekday: t });
|
|
207
|
-
return Array.from({ length: 7 }, (e, t) => n.format(new Date(2026, 8, 7 + t)));
|
|
208
|
-
}
|
|
209
|
-
function l(e, t) {
|
|
210
|
-
return s(t, {
|
|
211
|
-
year: "numeric",
|
|
212
|
-
month: "long"
|
|
213
|
-
}).format(e);
|
|
214
|
-
}
|
|
215
|
-
function u(e, t) {
|
|
216
|
-
return s(t, {
|
|
217
|
-
month: "long",
|
|
218
|
-
day: "numeric"
|
|
219
|
-
}).format(e);
|
|
220
|
-
}
|
|
221
|
-
function d(e, t, n) {
|
|
222
|
-
try {
|
|
223
|
-
return new Intl.NumberFormat(t, n).format(e);
|
|
224
|
-
} catch {
|
|
225
|
-
return new Intl.NumberFormat(void 0, n).format(e);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/index.ts
|
|
230
|
-
var f = "zh-CN", p = ["zh-CN", "en-US"], m = {
|
|
231
|
-
"zh-CN": r,
|
|
232
|
-
"en-US": i
|
|
233
|
-
}, h = Symbol("ca-locale");
|
|
234
|
-
function g(e) {
|
|
235
|
-
let t = {};
|
|
236
|
-
return Object.entries(e).forEach(([e, n]) => {
|
|
237
|
-
t[e] = typeof n == "string" ? n : g(n);
|
|
238
|
-
}), t;
|
|
239
|
-
}
|
|
240
|
-
function _(e, t) {
|
|
241
|
-
let n = g(e);
|
|
242
|
-
return Object.entries(t).forEach(([e, t]) => {
|
|
243
|
-
let r = n[e];
|
|
244
|
-
n[e] = typeof t == "string" || typeof r != "object" ? t : _(r, t);
|
|
245
|
-
}), n;
|
|
246
|
-
}
|
|
247
|
-
function v(e, t) {
|
|
248
|
-
let n = e;
|
|
249
|
-
for (let e of t.split(".")) {
|
|
250
|
-
if (typeof n != "object") return;
|
|
251
|
-
n = n[e];
|
|
252
|
-
}
|
|
253
|
-
return typeof n == "string" ? n : void 0;
|
|
254
|
-
}
|
|
255
|
-
function y(e) {
|
|
256
|
-
return v(m["zh-CN"] ?? {}, e);
|
|
257
|
-
}
|
|
258
|
-
function b(e, t) {
|
|
259
|
-
return t ? e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e) : e;
|
|
260
|
-
}
|
|
261
|
-
function x(e, t, n, r) {
|
|
262
|
-
let i = [
|
|
263
|
-
t,
|
|
264
|
-
t.split("-")[0],
|
|
265
|
-
n,
|
|
266
|
-
n.split("-")[0]
|
|
267
|
-
];
|
|
268
|
-
for (let t of i) {
|
|
269
|
-
if (!t) continue;
|
|
270
|
-
let n = v(e[t] ?? {}, r);
|
|
271
|
-
if (n !== void 0) return n;
|
|
298
|
+
form: {
|
|
299
|
+
required: "请输入{label}",
|
|
300
|
+
submit: "提交",
|
|
301
|
+
reset: "重置"
|
|
302
|
+
},
|
|
303
|
+
chart: {
|
|
304
|
+
compact: "cjk",
|
|
305
|
+
empty: "暂无数据",
|
|
306
|
+
loading: "数据加载中…",
|
|
307
|
+
total: "合计",
|
|
308
|
+
category: "类目",
|
|
309
|
+
value: "数值",
|
|
310
|
+
percent: "占比",
|
|
311
|
+
summaryLine: "{title}折线图,共 {categories} 个类目、{series} 个系列。",
|
|
312
|
+
summaryBar: "{title}柱状图,共 {categories} 个类目、{series} 个系列。",
|
|
313
|
+
summarySeries: "{name}:最小 {min},最大 {max},最新 {last}({category})。",
|
|
314
|
+
summaryPie: "{title}占比图,共 {count} 项,合计 {total}。",
|
|
315
|
+
summaryPieItem: "{name} {value},占 {percent}。",
|
|
316
|
+
summarySpark: "{title}趋势,{count} 个数据点,最小 {min},最大 {max},最新 {last}。",
|
|
317
|
+
summaryGauge: "{title}:{value} / {max},占 {percent}。"
|
|
318
|
+
},
|
|
319
|
+
error: {
|
|
320
|
+
forbidden: "无权访问该页面",
|
|
321
|
+
notFound: "页面不存在",
|
|
322
|
+
backHome: "返回首页"
|
|
272
323
|
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
return x(i.value, t.value, r.value, e) !== void 0;
|
|
285
|
-
},
|
|
286
|
-
setLocale(e) {
|
|
287
|
-
t.value = e;
|
|
288
|
-
},
|
|
289
|
-
mergeMessages(e, t) {
|
|
290
|
-
i.value = {
|
|
291
|
-
...i.value,
|
|
292
|
-
[e]: _(i.value[e] ?? {}, t)
|
|
293
|
-
};
|
|
294
|
-
},
|
|
295
|
-
getMessages(e) {
|
|
296
|
-
return g(i.value[e] ?? {});
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
function C(e, t) {
|
|
301
|
-
let n = {};
|
|
302
|
-
return Object.keys(e).forEach((t) => {
|
|
303
|
-
n[t] = g(e[t]);
|
|
304
|
-
}), Object.entries(t ?? {}).forEach(([e, t]) => {
|
|
305
|
-
n[e] = _(n[e] ?? {}, t);
|
|
306
|
-
}), n;
|
|
307
|
-
}
|
|
308
|
-
var w = S();
|
|
309
|
-
function T(e, t) {
|
|
310
|
-
e.provide(h, t), w = t;
|
|
311
|
-
}
|
|
312
|
-
function E() {
|
|
313
|
-
return w;
|
|
314
|
-
}
|
|
315
|
-
function D(e) {
|
|
316
|
-
w.setLocale(e);
|
|
317
|
-
}
|
|
318
|
-
function O() {
|
|
319
|
-
return w.locale.value;
|
|
320
|
-
}
|
|
321
|
-
function k() {
|
|
322
|
-
return w.locale;
|
|
323
|
-
}
|
|
324
|
-
function A() {
|
|
325
|
-
return e(h, w);
|
|
326
|
-
}
|
|
327
|
-
function j(e) {
|
|
328
|
-
t(h, e);
|
|
329
|
-
}
|
|
330
|
-
//#endregion
|
|
331
|
-
export { p as AVAILABLE_LOCALES, a as BASE_MONDAY, h as CA_LOCALE_KEY, f as DEFAULT_LOCALE, m as caMessages, S as createLocale, y as defaultMessage, u as formatDay, l as formatMonth, d as formatNumber, E as getCurrentLocale, O as getLocale, T as installLocale, v as lookupMessage, j as provideLocale, D as setLocale, A as useLocale, k as useLocaleRef, c as weekdayLabels };
|
|
324
|
+
} }, n = [{
|
|
325
|
+
code: "zh-CN",
|
|
326
|
+
label: "中"
|
|
327
|
+
}, {
|
|
328
|
+
code: "en-US",
|
|
329
|
+
label: "EN"
|
|
330
|
+
}], r = {
|
|
331
|
+
"zh-CN": t,
|
|
332
|
+
"en-US": e
|
|
333
|
+
};
|
|
334
|
+
export { n as LOCALES, e as enUS, r as frameworkMessages, t as zhCN };
|