@deot/docs-locale 1.0.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/README.md +60 -0
- package/dist/index.cjs +879 -0
- package/dist/index.d.ts +886 -0
- package/dist/index.js +870 -0
- package/package.json +20 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,870 @@
|
|
|
1
|
+
import { computed, inject, isRef, provide, ref, unref } from "vue";
|
|
2
|
+
//#region packages/locale/src/lang/en-US.ts
|
|
3
|
+
var enUS = {
|
|
4
|
+
name: "en-US",
|
|
5
|
+
client: {
|
|
6
|
+
common: {
|
|
7
|
+
close: "Close",
|
|
8
|
+
invalidSidebar: "Invalid sidebar resource",
|
|
9
|
+
loading: "Loading…",
|
|
10
|
+
poweredBy: "Powered by @deot/docs",
|
|
11
|
+
resourceRequestFailed: "Resource request failed",
|
|
12
|
+
yes: "Yes"
|
|
13
|
+
},
|
|
14
|
+
header: {
|
|
15
|
+
brand: "@deot/docs",
|
|
16
|
+
database: "Open resource database",
|
|
17
|
+
playgroundResource: "Manage Playground resources",
|
|
18
|
+
editor: "Customize this page",
|
|
19
|
+
language: "Switch language",
|
|
20
|
+
switchToDark: "Switch to dark theme",
|
|
21
|
+
switchToLight: "Switch to light theme"
|
|
22
|
+
},
|
|
23
|
+
home: {},
|
|
24
|
+
demos: {
|
|
25
|
+
title: "Renderer demos",
|
|
26
|
+
subtitle: "Reference compositions of built-in modules. Open a card to enter Combo.",
|
|
27
|
+
open: "Open demo",
|
|
28
|
+
openEditor: "Open editor",
|
|
29
|
+
editor: "Blank editor",
|
|
30
|
+
editorHint: "Open the Renderer editor on an empty canvas.",
|
|
31
|
+
back: "Back to catalog"
|
|
32
|
+
},
|
|
33
|
+
search: {
|
|
34
|
+
trigger: "Search docs",
|
|
35
|
+
untitled: "Untitled",
|
|
36
|
+
dialogLabel: "Search documentation",
|
|
37
|
+
placeholder: "Search docs",
|
|
38
|
+
clearQuery: "Clear query",
|
|
39
|
+
close: "Close search",
|
|
40
|
+
searching: "Searching…",
|
|
41
|
+
documentation: "Documentation",
|
|
42
|
+
noResults: "No results found.",
|
|
43
|
+
noCachedDocuments: "No cached documents yet.",
|
|
44
|
+
recent: "Recent",
|
|
45
|
+
noRecent: "No recent searches.",
|
|
46
|
+
pin: "Pin history",
|
|
47
|
+
unpin: "Unpin history",
|
|
48
|
+
remove: "Remove history",
|
|
49
|
+
navigateHint: "to navigate",
|
|
50
|
+
selectHint: "to select",
|
|
51
|
+
closeHint: "to close",
|
|
52
|
+
historyLoadFailed: "Unable to load search history.",
|
|
53
|
+
queryFailed: "Unable to search cached documents.",
|
|
54
|
+
historyUpdateFailed: "Unable to update search history.",
|
|
55
|
+
historyRemoveFailed: "Unable to remove search history."
|
|
56
|
+
},
|
|
57
|
+
database: {
|
|
58
|
+
title: "IndexedDB Resources",
|
|
59
|
+
back: "Back",
|
|
60
|
+
home: "Home",
|
|
61
|
+
records: "{count} records",
|
|
62
|
+
cache: "cache {size}",
|
|
63
|
+
columns: "Columns",
|
|
64
|
+
refresh: "Refresh",
|
|
65
|
+
updateAll: "Update all",
|
|
66
|
+
prefetch: "Prefetch",
|
|
67
|
+
clear: "Clear",
|
|
68
|
+
prune: "Prune",
|
|
69
|
+
url: "URL",
|
|
70
|
+
source: "Source",
|
|
71
|
+
contentStatus: "Content Status",
|
|
72
|
+
requestStatus: "Request Status",
|
|
73
|
+
namespace: "Namespace",
|
|
74
|
+
language: "Language",
|
|
75
|
+
type: "Type",
|
|
76
|
+
hash: "Hash",
|
|
77
|
+
content: "Content",
|
|
78
|
+
updated: "Updated",
|
|
79
|
+
checked: "Checked",
|
|
80
|
+
accessed: "Accessed",
|
|
81
|
+
previous: "Previous",
|
|
82
|
+
actions: "Actions",
|
|
83
|
+
update: "Update",
|
|
84
|
+
delete: "Delete",
|
|
85
|
+
loadFailed: "Load failed",
|
|
86
|
+
operationFailed: "Operation failed",
|
|
87
|
+
refreshed: "Refreshed",
|
|
88
|
+
reloadFailed: "Reload failed",
|
|
89
|
+
updatedSource: "{source} updated",
|
|
90
|
+
deletedSource: "{source} deleted",
|
|
91
|
+
updatedAll: "Updated all",
|
|
92
|
+
clearedAll: "Cleared all",
|
|
93
|
+
prefetchSummary: "Prefetch: {fulfilled} ok, {rejected} failed",
|
|
94
|
+
prefetched: "Prefetched {total}",
|
|
95
|
+
prefetchFailed: "Prefetch failed",
|
|
96
|
+
pruned: "Pruned {count}",
|
|
97
|
+
pruneFailed: "Garbage cleanup failed"
|
|
98
|
+
},
|
|
99
|
+
playgroundResource: {
|
|
100
|
+
title: "Playground Resource",
|
|
101
|
+
records: "{count} entries",
|
|
102
|
+
cache: "cache {size}",
|
|
103
|
+
hint: "Override module imports and preview CSS. `$docs.modules` and `$docs.styles` are this page's site defaults. Default URLs and probe results are stored locally; a row is overridden only when its current URL differs from the default. Saved overrides apply to newly opened Playgrounds; mounted previews do not hot-reload. Rolling back an override restores the default URL.",
|
|
104
|
+
back: "Back",
|
|
105
|
+
home: "Home",
|
|
106
|
+
columns: "Columns",
|
|
107
|
+
refresh: "Refresh",
|
|
108
|
+
prefetch: "Prefetch",
|
|
109
|
+
clear: "Clear",
|
|
110
|
+
kind: "Type",
|
|
111
|
+
kindImport: "Import",
|
|
112
|
+
kindStyle: "CSS",
|
|
113
|
+
alias: "Name",
|
|
114
|
+
defaultUrl: "Default URL",
|
|
115
|
+
currentUrl: "Current URL",
|
|
116
|
+
status: "Override",
|
|
117
|
+
overridden: "Overridden",
|
|
118
|
+
default: "Default",
|
|
119
|
+
requestStatus: "Request status",
|
|
120
|
+
updated: "Updated",
|
|
121
|
+
checked: "Checked",
|
|
122
|
+
actions: "Actions",
|
|
123
|
+
edit: "Edit",
|
|
124
|
+
save: "Save",
|
|
125
|
+
rollback: "Rollback",
|
|
126
|
+
rollbackSkipped: "Already using the default URL",
|
|
127
|
+
retry: "Retry",
|
|
128
|
+
urlPlaceholder: "https://cdn.example.com/pkg/index.js",
|
|
129
|
+
editTitle: "Edit URL",
|
|
130
|
+
loadFailed: "Load failed",
|
|
131
|
+
operationFailed: "Operation failed",
|
|
132
|
+
saveFailed: "Save failed",
|
|
133
|
+
rollbackFailed: "Rollback failed",
|
|
134
|
+
retryFailed: "Retry failed",
|
|
135
|
+
prefetchFailed: "Prefetch failed",
|
|
136
|
+
probeFailed: "Probe failed",
|
|
137
|
+
refreshed: "Refreshed",
|
|
138
|
+
cleared: "Cleared overrides",
|
|
139
|
+
saved: "{alias} saved",
|
|
140
|
+
rollbackDone: "{alias} rolled back",
|
|
141
|
+
retried: "{alias} retried",
|
|
142
|
+
prefetched: "Prefetched {total} entries",
|
|
143
|
+
prefetchSummary: "Prefetch: {fulfilled} succeeded, {rejected} failed"
|
|
144
|
+
},
|
|
145
|
+
paging: {
|
|
146
|
+
search: "Search",
|
|
147
|
+
reset: "Reset",
|
|
148
|
+
enter: "Enter",
|
|
149
|
+
select: "Select",
|
|
150
|
+
pickDate: "Pick date",
|
|
151
|
+
min: "Min",
|
|
152
|
+
max: "Max"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
markdown: { indicator: {
|
|
156
|
+
label: "Document indicator",
|
|
157
|
+
untitled: "Untitled section",
|
|
158
|
+
document: "Document"
|
|
159
|
+
} },
|
|
160
|
+
playground: {
|
|
161
|
+
common: {
|
|
162
|
+
copy: "Copy",
|
|
163
|
+
copyCode: "Copy code",
|
|
164
|
+
copyCurrentFile: "Copy current file",
|
|
165
|
+
close: "Close"
|
|
166
|
+
},
|
|
167
|
+
runtime: {
|
|
168
|
+
preview: "Runtime preview",
|
|
169
|
+
files: "File preview",
|
|
170
|
+
auto: "Auto",
|
|
171
|
+
viewport: "Viewport: {value}",
|
|
172
|
+
viewportMenu: "Runtime viewport",
|
|
173
|
+
editFiles: "Edit files",
|
|
174
|
+
importMapTip: "Check the import path, or add an Import Map entry for this dependency."
|
|
175
|
+
},
|
|
176
|
+
files: { entry: "Entry" },
|
|
177
|
+
editor: {
|
|
178
|
+
entry: "Entry file",
|
|
179
|
+
entryCannotDelete: "The entry file cannot be deleted",
|
|
180
|
+
confirmDelete: "Delete {filename}?",
|
|
181
|
+
deleteFile: "Delete file",
|
|
182
|
+
createFile: "Create file",
|
|
183
|
+
setEntry: "Set as entry"
|
|
184
|
+
},
|
|
185
|
+
validation: {
|
|
186
|
+
entryMissing: "Entry file {filename} does not exist",
|
|
187
|
+
filenameRequired: "Enter a filename",
|
|
188
|
+
filenameRelative: "The filename must be a relative POSIX path",
|
|
189
|
+
filenameSegments: "The path cannot contain empty, . or .. segments",
|
|
190
|
+
fileTypeUnsupported: "Unsupported file type",
|
|
191
|
+
filenameExists: "The filename already exists"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
renderer: {
|
|
195
|
+
common: {
|
|
196
|
+
loading: "Loading…",
|
|
197
|
+
unknownModule: "Unknown module: {type}",
|
|
198
|
+
unsupportedVersion: "Unsupported module version: {version}",
|
|
199
|
+
migrationUnavailable: "Module migration is unavailable",
|
|
200
|
+
back: "Back",
|
|
201
|
+
untitledPage: "Untitled Page",
|
|
202
|
+
undo: "Undo",
|
|
203
|
+
redo: "Redo",
|
|
204
|
+
import: "Import",
|
|
205
|
+
export: "Export",
|
|
206
|
+
preview: "Preview",
|
|
207
|
+
save: "Save",
|
|
208
|
+
saved: "Saved",
|
|
209
|
+
page: "Page",
|
|
210
|
+
blocks: "{count} blocks",
|
|
211
|
+
close: "Close",
|
|
212
|
+
validationFailed: "Document validation failed",
|
|
213
|
+
draftRestoreFailed: "Unable to restore the local draft",
|
|
214
|
+
clearDraft: "Clear draft",
|
|
215
|
+
draftCleared: "Local draft cleared",
|
|
216
|
+
draftClearFailed: "Unable to clear the local draft"
|
|
217
|
+
},
|
|
218
|
+
modules: {
|
|
219
|
+
title: "Modules",
|
|
220
|
+
basicGroup: "Basic",
|
|
221
|
+
docsGroup: "Docs",
|
|
222
|
+
customGroup: "Custom",
|
|
223
|
+
addFailed: "Unable to add this module",
|
|
224
|
+
maxInstances: "Only {count} {type} module(s) are allowed",
|
|
225
|
+
dragTip: "Drag modules below onto the canvas to place them",
|
|
226
|
+
space: "Space",
|
|
227
|
+
titleModule: "Title",
|
|
228
|
+
text: "Text",
|
|
229
|
+
list: "List",
|
|
230
|
+
image: "Image",
|
|
231
|
+
area: "Image hotspots",
|
|
232
|
+
actions: "Actions",
|
|
233
|
+
hero: "Hero",
|
|
234
|
+
features: "Features",
|
|
235
|
+
steps: "Steps",
|
|
236
|
+
faq: "FAQ",
|
|
237
|
+
cta: "Call to action",
|
|
238
|
+
ads: "Ads",
|
|
239
|
+
page: "Page",
|
|
240
|
+
selection: "Selection",
|
|
241
|
+
markdown: "Markdown",
|
|
242
|
+
sfc: "Remote SFC"
|
|
243
|
+
},
|
|
244
|
+
inspector: {
|
|
245
|
+
title: "Properties",
|
|
246
|
+
page: "Page",
|
|
247
|
+
spacing: "Spacing",
|
|
248
|
+
placement: "Placement",
|
|
249
|
+
module: "Module",
|
|
250
|
+
margin: "Margin",
|
|
251
|
+
padding: "Padding",
|
|
252
|
+
position: "Position",
|
|
253
|
+
dimensions: "Dimensions",
|
|
254
|
+
marginTop: "Margin top",
|
|
255
|
+
marginBottom: "Margin bottom",
|
|
256
|
+
paddingTop: "Padding top",
|
|
257
|
+
paddingBottom: "Padding bottom",
|
|
258
|
+
paddingLeft: "Padding left",
|
|
259
|
+
paddingRight: "Padding right",
|
|
260
|
+
fullWidth: "Fill screen",
|
|
261
|
+
layout: "Layout",
|
|
262
|
+
appearance: "Appearance",
|
|
263
|
+
borderRadius: "Corner radius",
|
|
264
|
+
independentCorners: "Independent corners",
|
|
265
|
+
borderRadiusTopLeft: "Top left radius",
|
|
266
|
+
borderRadiusTopRight: "Top right radius",
|
|
267
|
+
borderRadiusBottomRight: "Bottom right radius",
|
|
268
|
+
borderRadiusBottomLeft: "Bottom left radius",
|
|
269
|
+
delete: "Delete",
|
|
270
|
+
loading: "Loading…",
|
|
271
|
+
selection: "Group"
|
|
272
|
+
},
|
|
273
|
+
editor: {
|
|
274
|
+
addItem: "Add item",
|
|
275
|
+
removeItem: "Remove item",
|
|
276
|
+
reorder: "Reorder",
|
|
277
|
+
mode: "Mode",
|
|
278
|
+
sortable: "Sortable",
|
|
279
|
+
draggable: "Draggable",
|
|
280
|
+
maxWidth: "Maximum width",
|
|
281
|
+
referenceWidth: "Reference width",
|
|
282
|
+
minHeight: "Minimum height",
|
|
283
|
+
canvasWidth: "Canvas width",
|
|
284
|
+
canvasHeight: "Canvas height",
|
|
285
|
+
background: "Background",
|
|
286
|
+
actions: "Actions",
|
|
287
|
+
label: "Label",
|
|
288
|
+
target: "Target",
|
|
289
|
+
variant: "Variant",
|
|
290
|
+
columns: "Columns",
|
|
291
|
+
gap: "Gap",
|
|
292
|
+
cards: "Cards",
|
|
293
|
+
title: "Title",
|
|
294
|
+
description: "Description",
|
|
295
|
+
eyebrow: "Tag",
|
|
296
|
+
source: "Source",
|
|
297
|
+
sourceHint: "Path, https or base64",
|
|
298
|
+
markdownSourceHint: "Relative path or https URL",
|
|
299
|
+
markdownContent: "Markdown content",
|
|
300
|
+
markdownContentHint: "Inline Markdown, used instead of the source",
|
|
301
|
+
paintAreas: "Draw hotspots",
|
|
302
|
+
areas: "Hotspots",
|
|
303
|
+
areaItem: "Hotspot {index}",
|
|
304
|
+
areaMax: "Up to {count}",
|
|
305
|
+
areaNeedImage: "Upload an image first",
|
|
306
|
+
addArea: "Add hotspot",
|
|
307
|
+
darkSource: "Dark source",
|
|
308
|
+
alt: "Alternative text",
|
|
309
|
+
fit: "Fit",
|
|
310
|
+
borderRadius: "Border radius",
|
|
311
|
+
eager: "Eager loading",
|
|
312
|
+
ordered: "Ordered",
|
|
313
|
+
items: "Items",
|
|
314
|
+
height: "Height",
|
|
315
|
+
text: "Text",
|
|
316
|
+
fontSize: "Font size",
|
|
317
|
+
fontWeight: "Font weight",
|
|
318
|
+
lineHeight: "Line height",
|
|
319
|
+
letterSpacing: "Letter spacing",
|
|
320
|
+
color: "Color",
|
|
321
|
+
align: "Align",
|
|
322
|
+
left: "Left",
|
|
323
|
+
center: "Center",
|
|
324
|
+
heading: "Heading",
|
|
325
|
+
accent: "Accent",
|
|
326
|
+
accentSecondary: "Secondary accent",
|
|
327
|
+
showVisual: "Show visual",
|
|
328
|
+
highlights: "Highlights",
|
|
329
|
+
value: "Value",
|
|
330
|
+
badge: "Badge",
|
|
331
|
+
icon: "Icon",
|
|
332
|
+
iconHint: "Type, https or base64",
|
|
333
|
+
pickImage: "Upload image",
|
|
334
|
+
steps: "Steps",
|
|
335
|
+
question: "Question",
|
|
336
|
+
answer: "Answer",
|
|
337
|
+
solid: "Solid",
|
|
338
|
+
outline: "Outline",
|
|
339
|
+
ghost: "Ghost",
|
|
340
|
+
link: "Link",
|
|
341
|
+
size: "Size",
|
|
342
|
+
small: "Small",
|
|
343
|
+
medium: "Medium",
|
|
344
|
+
large: "Large",
|
|
345
|
+
textColor: "Text color",
|
|
346
|
+
layout: "Layout",
|
|
347
|
+
tile: "Tile",
|
|
348
|
+
scroll: "Scroll",
|
|
349
|
+
banner: "Banner",
|
|
350
|
+
card: "Card",
|
|
351
|
+
poster: "Poster",
|
|
352
|
+
notice: "Notice",
|
|
353
|
+
speed: "Scroll interval",
|
|
354
|
+
ads: "Ads"
|
|
355
|
+
},
|
|
356
|
+
canvas: {
|
|
357
|
+
scale: "Scale",
|
|
358
|
+
layers: "Layers",
|
|
359
|
+
forward: "Move forward",
|
|
360
|
+
backward: "Move backward",
|
|
361
|
+
fit: "Fit",
|
|
362
|
+
grid: "Grid",
|
|
363
|
+
ruler: "Ruler",
|
|
364
|
+
guides: "Guides",
|
|
365
|
+
showGuidesHint: "Click to show guides",
|
|
366
|
+
hideGuidesHint: "Click to hide guides",
|
|
367
|
+
deleteGuide: "Double-click to delete the guide",
|
|
368
|
+
map: "Map",
|
|
369
|
+
dropModules: "Drop modules here",
|
|
370
|
+
releaseToInsert: "Release to insert the module here",
|
|
371
|
+
resize: "Resize {handle}",
|
|
372
|
+
rotate: "Rotate",
|
|
373
|
+
bringToFront: "Bring to front",
|
|
374
|
+
sendToBack: "Send to back",
|
|
375
|
+
ungroup: "Ungroup",
|
|
376
|
+
lock: "Lock",
|
|
377
|
+
unlock: "Unlock",
|
|
378
|
+
copy: "Copy",
|
|
379
|
+
paste: "Paste",
|
|
380
|
+
alreadyTop: "Already at the top",
|
|
381
|
+
alreadyBottom: "Already at the bottom"
|
|
382
|
+
},
|
|
383
|
+
json: {
|
|
384
|
+
title: "Document JSON",
|
|
385
|
+
tree: "Tree",
|
|
386
|
+
source: "Source",
|
|
387
|
+
apply: "Apply",
|
|
388
|
+
cancel: "Cancel",
|
|
389
|
+
duplicateKey: "Duplicate key: {key}",
|
|
390
|
+
keyLocked: "This protocol key cannot be renamed",
|
|
391
|
+
valueLocked: "This value cannot be changed",
|
|
392
|
+
kindLocked: "This type cannot be changed",
|
|
393
|
+
requiredField: "This required field cannot be removed",
|
|
394
|
+
rootLocked: "Document root keys cannot be added or removed"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region packages/locale/src/lang/zh-CN.ts
|
|
400
|
+
var zhCN = {
|
|
401
|
+
name: "zh-CN",
|
|
402
|
+
client: {
|
|
403
|
+
common: {
|
|
404
|
+
close: "关闭",
|
|
405
|
+
invalidSidebar: "侧边栏数据无效",
|
|
406
|
+
loading: "加载中…",
|
|
407
|
+
poweredBy: "由 @deot/docs 提供支持",
|
|
408
|
+
resourceRequestFailed: "资源请求失败",
|
|
409
|
+
yes: "是"
|
|
410
|
+
},
|
|
411
|
+
header: {
|
|
412
|
+
brand: "@deot/docs",
|
|
413
|
+
database: "打开资源数据库",
|
|
414
|
+
playgroundResource: "管理 Playground 资源",
|
|
415
|
+
editor: "装修当前页面",
|
|
416
|
+
language: "切换语言",
|
|
417
|
+
switchToDark: "切换至深色主题",
|
|
418
|
+
switchToLight: "切换至浅色主题"
|
|
419
|
+
},
|
|
420
|
+
home: {},
|
|
421
|
+
demos: {
|
|
422
|
+
title: "Renderer 演示",
|
|
423
|
+
subtitle: "对照内置模块组合。点击卡片进入 Combo。",
|
|
424
|
+
open: "打开演示",
|
|
425
|
+
openEditor: "打开编辑器",
|
|
426
|
+
editor: "空白编辑器",
|
|
427
|
+
editorHint: "进入 Renderer 编辑器,从空画布开始。",
|
|
428
|
+
back: "返回目录"
|
|
429
|
+
},
|
|
430
|
+
search: {
|
|
431
|
+
trigger: "搜索文档",
|
|
432
|
+
untitled: "未命名文档",
|
|
433
|
+
dialogLabel: "搜索文档",
|
|
434
|
+
placeholder: "搜索文档",
|
|
435
|
+
clearQuery: "清空",
|
|
436
|
+
close: "关闭搜索",
|
|
437
|
+
searching: "搜索中…",
|
|
438
|
+
documentation: "文档",
|
|
439
|
+
noResults: "未找到结果。",
|
|
440
|
+
noCachedDocuments: "暂无已缓存文档。",
|
|
441
|
+
recent: "最近访问",
|
|
442
|
+
noRecent: "暂无搜索历史。",
|
|
443
|
+
pin: "收藏历史",
|
|
444
|
+
unpin: "取消收藏",
|
|
445
|
+
remove: "删除历史",
|
|
446
|
+
navigateHint: "切换",
|
|
447
|
+
selectHint: "选择",
|
|
448
|
+
closeHint: "关闭",
|
|
449
|
+
historyLoadFailed: "无法加载搜索历史。",
|
|
450
|
+
queryFailed: "无法搜索已缓存文档。",
|
|
451
|
+
historyUpdateFailed: "无法更新搜索历史。",
|
|
452
|
+
historyRemoveFailed: "无法删除搜索历史。"
|
|
453
|
+
},
|
|
454
|
+
database: {
|
|
455
|
+
title: "IndexedDB 资源",
|
|
456
|
+
back: "返回",
|
|
457
|
+
home: "回到首页",
|
|
458
|
+
records: "{count} 条记录",
|
|
459
|
+
cache: "缓存 {size}",
|
|
460
|
+
columns: "列",
|
|
461
|
+
refresh: "刷新",
|
|
462
|
+
updateAll: "全部更新",
|
|
463
|
+
prefetch: "预加载",
|
|
464
|
+
clear: "清空",
|
|
465
|
+
prune: "清理垃圾",
|
|
466
|
+
url: "URL",
|
|
467
|
+
source: "来源",
|
|
468
|
+
contentStatus: "内容状态",
|
|
469
|
+
requestStatus: "请求状态",
|
|
470
|
+
namespace: "命名空间",
|
|
471
|
+
language: "语言",
|
|
472
|
+
type: "类型",
|
|
473
|
+
hash: "Hash",
|
|
474
|
+
content: "内容",
|
|
475
|
+
updated: "更新时间",
|
|
476
|
+
checked: "检查时间",
|
|
477
|
+
accessed: "访问时间",
|
|
478
|
+
previous: "历史版本",
|
|
479
|
+
actions: "操作",
|
|
480
|
+
update: "更新",
|
|
481
|
+
delete: "删除",
|
|
482
|
+
loadFailed: "加载失败",
|
|
483
|
+
operationFailed: "操作失败",
|
|
484
|
+
refreshed: "已刷新",
|
|
485
|
+
reloadFailed: "更新失败",
|
|
486
|
+
updatedSource: "{source} 已更新",
|
|
487
|
+
deletedSource: "{source} 已删除",
|
|
488
|
+
updatedAll: "已全部更新",
|
|
489
|
+
clearedAll: "已全部清空",
|
|
490
|
+
prefetchSummary: "预加载:{fulfilled} 个成功,{rejected} 个失败",
|
|
491
|
+
prefetched: "已预加载 {total} 个资源",
|
|
492
|
+
prefetchFailed: "预加载失败",
|
|
493
|
+
pruned: "已清理 {count} 个资源",
|
|
494
|
+
pruneFailed: "垃圾清理失败"
|
|
495
|
+
},
|
|
496
|
+
playgroundResource: {
|
|
497
|
+
title: "Playground 资源",
|
|
498
|
+
records: "{count} 项",
|
|
499
|
+
cache: "缓存 {size}",
|
|
500
|
+
hint: "可覆盖模块 import 与预览 CSS。$docs.modules 与 $docs.styles 是本页的站点默认;默认地址与探测结果都会写入本地库;当前地址与默认不同才算覆盖。保存后对新打开的 Playground 生效,已挂载的预览不会热更新。回滚覆盖后回退默认地址。",
|
|
501
|
+
back: "返回",
|
|
502
|
+
home: "回到首页",
|
|
503
|
+
columns: "列",
|
|
504
|
+
refresh: "刷新",
|
|
505
|
+
prefetch: "探测",
|
|
506
|
+
clear: "清空",
|
|
507
|
+
kind: "类型",
|
|
508
|
+
kindImport: "Import",
|
|
509
|
+
kindStyle: "CSS",
|
|
510
|
+
alias: "名称",
|
|
511
|
+
defaultUrl: "默认地址",
|
|
512
|
+
currentUrl: "当前地址",
|
|
513
|
+
status: "覆盖状态",
|
|
514
|
+
overridden: "已覆盖",
|
|
515
|
+
default: "默认",
|
|
516
|
+
requestStatus: "探测状态",
|
|
517
|
+
updated: "更新时间",
|
|
518
|
+
checked: "探测时间",
|
|
519
|
+
actions: "操作",
|
|
520
|
+
edit: "编辑",
|
|
521
|
+
save: "保存",
|
|
522
|
+
rollback: "回滚",
|
|
523
|
+
rollbackSkipped: "当前已是默认地址,无需回滚",
|
|
524
|
+
retry: "重试",
|
|
525
|
+
urlPlaceholder: "https://cdn.example.com/pkg/index.js",
|
|
526
|
+
editTitle: "编辑地址",
|
|
527
|
+
loadFailed: "加载失败",
|
|
528
|
+
operationFailed: "操作失败",
|
|
529
|
+
saveFailed: "保存失败",
|
|
530
|
+
rollbackFailed: "回滚失败",
|
|
531
|
+
retryFailed: "重试失败",
|
|
532
|
+
prefetchFailed: "探测失败",
|
|
533
|
+
probeFailed: "探测失败",
|
|
534
|
+
refreshed: "已刷新",
|
|
535
|
+
cleared: "已清空覆盖",
|
|
536
|
+
saved: "{alias} 已保存",
|
|
537
|
+
rollbackDone: "{alias} 已回滚",
|
|
538
|
+
retried: "{alias} 已重试",
|
|
539
|
+
prefetched: "已探测 {total} 项",
|
|
540
|
+
prefetchSummary: "探测:{fulfilled} 个成功,{rejected} 个失败"
|
|
541
|
+
},
|
|
542
|
+
paging: {
|
|
543
|
+
search: "搜索",
|
|
544
|
+
reset: "重置",
|
|
545
|
+
enter: "请输入",
|
|
546
|
+
select: "请选择",
|
|
547
|
+
pickDate: "选择日期",
|
|
548
|
+
min: "最小值",
|
|
549
|
+
max: "最大值"
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
markdown: { indicator: {
|
|
553
|
+
label: "文档指示器",
|
|
554
|
+
untitled: "未命名章节",
|
|
555
|
+
document: "文档"
|
|
556
|
+
} },
|
|
557
|
+
playground: {
|
|
558
|
+
common: {
|
|
559
|
+
copy: "复制",
|
|
560
|
+
copyCode: "复制代码",
|
|
561
|
+
copyCurrentFile: "复制当前文件",
|
|
562
|
+
close: "关闭"
|
|
563
|
+
},
|
|
564
|
+
runtime: {
|
|
565
|
+
preview: "运行时预览",
|
|
566
|
+
files: "文件预览",
|
|
567
|
+
auto: "自适应",
|
|
568
|
+
viewport: "视口:{value}",
|
|
569
|
+
viewportMenu: "运行时视口",
|
|
570
|
+
editFiles: "编辑文件",
|
|
571
|
+
importMapTip: "请检查导入路径,或为该依赖补充 Import Map。"
|
|
572
|
+
},
|
|
573
|
+
files: { entry: "入口" },
|
|
574
|
+
editor: {
|
|
575
|
+
entry: "入口文件",
|
|
576
|
+
entryCannotDelete: "入口文件不能删除",
|
|
577
|
+
confirmDelete: "确认删除 {filename}?",
|
|
578
|
+
deleteFile: "删除文件",
|
|
579
|
+
createFile: "新建文件",
|
|
580
|
+
setEntry: "设为入口"
|
|
581
|
+
},
|
|
582
|
+
validation: {
|
|
583
|
+
entryMissing: "入口文件 {filename} 不存在",
|
|
584
|
+
filenameRequired: "请输入文件名",
|
|
585
|
+
filenameRelative: "文件名必须是相对 POSIX 路径",
|
|
586
|
+
filenameSegments: "文件路径不能包含空段、. 或 ..",
|
|
587
|
+
fileTypeUnsupported: "不支持该文件类型",
|
|
588
|
+
filenameExists: "文件名已存在"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
renderer: {
|
|
592
|
+
common: {
|
|
593
|
+
loading: "加载中…",
|
|
594
|
+
unknownModule: "未知模块:{type}",
|
|
595
|
+
unsupportedVersion: "不支持的模块版本:{version}",
|
|
596
|
+
migrationUnavailable: "模块缺少迁移能力",
|
|
597
|
+
back: "返回",
|
|
598
|
+
untitledPage: "未命名页面",
|
|
599
|
+
undo: "撤销",
|
|
600
|
+
redo: "重做",
|
|
601
|
+
import: "导入",
|
|
602
|
+
export: "导出",
|
|
603
|
+
preview: "预览",
|
|
604
|
+
save: "保存",
|
|
605
|
+
saved: "已保存",
|
|
606
|
+
page: "页面",
|
|
607
|
+
blocks: "{count} 个模块",
|
|
608
|
+
close: "关闭",
|
|
609
|
+
validationFailed: "页面校验失败",
|
|
610
|
+
draftRestoreFailed: "无法恢复本地草稿",
|
|
611
|
+
clearDraft: "清除草稿",
|
|
612
|
+
draftCleared: "已清除本地草稿",
|
|
613
|
+
draftClearFailed: "无法清除本地草稿"
|
|
614
|
+
},
|
|
615
|
+
modules: {
|
|
616
|
+
title: "模块",
|
|
617
|
+
basicGroup: "基础模块",
|
|
618
|
+
docsGroup: "文档模块",
|
|
619
|
+
customGroup: "业务模块",
|
|
620
|
+
addFailed: "无法添加该模块",
|
|
621
|
+
maxInstances: "{type} 模块最多允许 {count} 个",
|
|
622
|
+
dragTip: "请拖动下方组件到指定位置设置",
|
|
623
|
+
space: "间距",
|
|
624
|
+
titleModule: "标题",
|
|
625
|
+
text: "文本",
|
|
626
|
+
list: "列表",
|
|
627
|
+
image: "图片",
|
|
628
|
+
area: "图片热区",
|
|
629
|
+
actions: "操作区",
|
|
630
|
+
hero: "首屏",
|
|
631
|
+
features: "特性",
|
|
632
|
+
steps: "步骤",
|
|
633
|
+
faq: "问答",
|
|
634
|
+
cta: "行动条",
|
|
635
|
+
ads: "广告位",
|
|
636
|
+
page: "页面",
|
|
637
|
+
selection: "组合",
|
|
638
|
+
markdown: "Markdown",
|
|
639
|
+
sfc: "远程 SFC"
|
|
640
|
+
},
|
|
641
|
+
inspector: {
|
|
642
|
+
title: "属性",
|
|
643
|
+
page: "页面",
|
|
644
|
+
spacing: "间距",
|
|
645
|
+
placement: "位置",
|
|
646
|
+
module: "模块",
|
|
647
|
+
margin: "外边距",
|
|
648
|
+
padding: "内边距",
|
|
649
|
+
position: "坐标",
|
|
650
|
+
dimensions: "尺寸",
|
|
651
|
+
marginTop: "上外边距",
|
|
652
|
+
marginBottom: "下外边距",
|
|
653
|
+
paddingTop: "上内边距",
|
|
654
|
+
paddingBottom: "下内边距",
|
|
655
|
+
paddingLeft: "左内边距",
|
|
656
|
+
paddingRight: "右内边距",
|
|
657
|
+
fullWidth: "铺满屏幕",
|
|
658
|
+
layout: "布局",
|
|
659
|
+
appearance: "外观",
|
|
660
|
+
borderRadius: "圆角",
|
|
661
|
+
independentCorners: "独立圆角",
|
|
662
|
+
borderRadiusTopLeft: "左上圆角",
|
|
663
|
+
borderRadiusTopRight: "右上圆角",
|
|
664
|
+
borderRadiusBottomRight: "右下圆角",
|
|
665
|
+
borderRadiusBottomLeft: "左下圆角",
|
|
666
|
+
delete: "删除",
|
|
667
|
+
loading: "加载中…",
|
|
668
|
+
selection: "组合选中"
|
|
669
|
+
},
|
|
670
|
+
editor: {
|
|
671
|
+
addItem: "添加一项",
|
|
672
|
+
removeItem: "删除该项",
|
|
673
|
+
reorder: "拖动排序",
|
|
674
|
+
mode: "布局模式",
|
|
675
|
+
sortable: "排序布局",
|
|
676
|
+
draggable: "自由布局",
|
|
677
|
+
maxWidth: "最大宽度",
|
|
678
|
+
referenceWidth: "参考宽度",
|
|
679
|
+
minHeight: "最小高度",
|
|
680
|
+
canvasWidth: "画布宽度",
|
|
681
|
+
canvasHeight: "画布高度",
|
|
682
|
+
background: "背景",
|
|
683
|
+
actions: "操作项",
|
|
684
|
+
label: "文案",
|
|
685
|
+
target: "目标",
|
|
686
|
+
variant: "样式",
|
|
687
|
+
columns: "列数",
|
|
688
|
+
gap: "间距",
|
|
689
|
+
cards: "卡片",
|
|
690
|
+
title: "标题",
|
|
691
|
+
description: "描述",
|
|
692
|
+
eyebrow: "标签",
|
|
693
|
+
source: "资源地址",
|
|
694
|
+
sourceHint: "路径、https 或 base64",
|
|
695
|
+
markdownSourceHint: "相对路径或 https 地址",
|
|
696
|
+
markdownContent: "Markdown 内容",
|
|
697
|
+
markdownContentHint: "直接填写 Markdown,优先于资源地址",
|
|
698
|
+
paintAreas: "绘制热区",
|
|
699
|
+
areas: "热区",
|
|
700
|
+
areaItem: "热区{index}",
|
|
701
|
+
areaMax: "最多 {count} 个",
|
|
702
|
+
areaNeedImage: "请先上传图片",
|
|
703
|
+
addArea: "添加热区",
|
|
704
|
+
darkSource: "暗色图片",
|
|
705
|
+
alt: "替代文本",
|
|
706
|
+
fit: "填充方式",
|
|
707
|
+
borderRadius: "圆角",
|
|
708
|
+
eager: "立即加载",
|
|
709
|
+
ordered: "有序列表",
|
|
710
|
+
items: "列表项",
|
|
711
|
+
height: "高度",
|
|
712
|
+
text: "文本",
|
|
713
|
+
fontSize: "字号",
|
|
714
|
+
fontWeight: "字重",
|
|
715
|
+
lineHeight: "行高",
|
|
716
|
+
letterSpacing: "字间距",
|
|
717
|
+
color: "颜色",
|
|
718
|
+
align: "对齐",
|
|
719
|
+
left: "居左",
|
|
720
|
+
center: "居中",
|
|
721
|
+
heading: "标题级别",
|
|
722
|
+
accent: "强调色",
|
|
723
|
+
accentSecondary: "辅助色",
|
|
724
|
+
showVisual: "装饰图形",
|
|
725
|
+
highlights: "数据要点",
|
|
726
|
+
value: "数值",
|
|
727
|
+
badge: "标签",
|
|
728
|
+
icon: "图标",
|
|
729
|
+
iconHint: "类型、https 或 base64",
|
|
730
|
+
pickImage: "上传图片",
|
|
731
|
+
steps: "步骤",
|
|
732
|
+
question: "问题",
|
|
733
|
+
answer: "回答",
|
|
734
|
+
solid: "实心",
|
|
735
|
+
outline: "描边",
|
|
736
|
+
ghost: "浅底",
|
|
737
|
+
link: "链接",
|
|
738
|
+
size: "尺寸",
|
|
739
|
+
small: "小",
|
|
740
|
+
medium: "中",
|
|
741
|
+
large: "大",
|
|
742
|
+
textColor: "文字色",
|
|
743
|
+
layout: "排列",
|
|
744
|
+
tile: "平铺",
|
|
745
|
+
scroll: "滚动",
|
|
746
|
+
banner: "横幅",
|
|
747
|
+
card: "卡片",
|
|
748
|
+
poster: "海报",
|
|
749
|
+
notice: "通知条",
|
|
750
|
+
speed: "滚动间隔",
|
|
751
|
+
ads: "广告"
|
|
752
|
+
},
|
|
753
|
+
canvas: {
|
|
754
|
+
scale: "缩放",
|
|
755
|
+
layers: "图层",
|
|
756
|
+
forward: "上移一层",
|
|
757
|
+
backward: "下移一层",
|
|
758
|
+
fit: "适应",
|
|
759
|
+
grid: "网格",
|
|
760
|
+
ruler: "标尺",
|
|
761
|
+
guides: "辅助线",
|
|
762
|
+
showGuidesHint: "单击显示辅助线",
|
|
763
|
+
hideGuidesHint: "单击隐藏辅助线",
|
|
764
|
+
deleteGuide: "双击删除参考线",
|
|
765
|
+
map: "缩略图",
|
|
766
|
+
dropModules: "拖入模块到这里",
|
|
767
|
+
releaseToInsert: "释放鼠标将模块添加到此处",
|
|
768
|
+
resize: "缩放 {handle}",
|
|
769
|
+
rotate: "旋转",
|
|
770
|
+
bringToFront: "置顶",
|
|
771
|
+
sendToBack: "置底",
|
|
772
|
+
ungroup: "取消组合",
|
|
773
|
+
lock: "锁定",
|
|
774
|
+
unlock: "取消锁定",
|
|
775
|
+
copy: "复制",
|
|
776
|
+
paste: "粘贴",
|
|
777
|
+
alreadyTop: "已经置顶,无需操作",
|
|
778
|
+
alreadyBottom: "已经置底,无需操作"
|
|
779
|
+
},
|
|
780
|
+
json: {
|
|
781
|
+
title: "页面 JSON",
|
|
782
|
+
tree: "树形",
|
|
783
|
+
source: "源码",
|
|
784
|
+
apply: "应用",
|
|
785
|
+
cancel: "取消",
|
|
786
|
+
duplicateKey: "键名重复:{key}",
|
|
787
|
+
keyLocked: "协议键名不可修改",
|
|
788
|
+
valueLocked: "该值不可修改",
|
|
789
|
+
kindLocked: "该类型不可修改",
|
|
790
|
+
requiredField: "必填字段不可删除",
|
|
791
|
+
rootLocked: "文档根键不可增删"
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
//#endregion
|
|
796
|
+
//#region packages/locale/src/index.ts
|
|
797
|
+
var NAMESPACES = /* @__PURE__ */ new Set([
|
|
798
|
+
"client",
|
|
799
|
+
"markdown",
|
|
800
|
+
"playground",
|
|
801
|
+
"renderer"
|
|
802
|
+
]);
|
|
803
|
+
var cloneMerge = (base, override) => {
|
|
804
|
+
if (!base || typeof base !== "object" || Array.isArray(base)) return override ?? base;
|
|
805
|
+
const result = { ...base };
|
|
806
|
+
if (!override || typeof override !== "object" || Array.isArray(override)) return result;
|
|
807
|
+
for (const [key, value] of Object.entries(override)) result[key] = value && typeof value === "object" && !Array.isArray(value) ? cloneMerge(result[key], value) : value;
|
|
808
|
+
return result;
|
|
809
|
+
};
|
|
810
|
+
var LOCALE_ALIASES = {
|
|
811
|
+
"zh": "zh-CN",
|
|
812
|
+
"zh-cn": "zh-CN",
|
|
813
|
+
"en": "en-US",
|
|
814
|
+
"en-us": "en-US"
|
|
815
|
+
};
|
|
816
|
+
var normalizeLocale = (value = "") => {
|
|
817
|
+
const name = value.trim().replace(/_/gu, "-");
|
|
818
|
+
return LOCALE_ALIASES[name.toLowerCase()] || name;
|
|
819
|
+
};
|
|
820
|
+
var withoutLabel = (entry) => {
|
|
821
|
+
if (!entry) return {};
|
|
822
|
+
const messages = { ...entry };
|
|
823
|
+
delete messages.label;
|
|
824
|
+
return messages;
|
|
825
|
+
};
|
|
826
|
+
var createLocale = (name, messages = {}) => ({
|
|
827
|
+
...cloneMerge(enUS, messages),
|
|
828
|
+
name: normalizeLocale(name)
|
|
829
|
+
});
|
|
830
|
+
var resolveLocale = (lang, locales = {}) => {
|
|
831
|
+
const requested = normalizeLocale(lang);
|
|
832
|
+
if (!requested) return createLocale(enUS.name);
|
|
833
|
+
const matched = Object.entries(locales).find(([name]) => normalizeLocale(name).toLowerCase() === requested.toLowerCase());
|
|
834
|
+
const name = matched ? normalizeLocale(matched[0]) : requested;
|
|
835
|
+
if (!matched && name !== zhCN.name && name !== enUS.name) return createLocale(enUS.name);
|
|
836
|
+
return createLocale(name, cloneMerge(name === zhCN.name ? zhCN : enUS, withoutLabel(matched?.[1])));
|
|
837
|
+
};
|
|
838
|
+
var translate = (path, options, locale) => {
|
|
839
|
+
const parts = path.split(".");
|
|
840
|
+
if (!NAMESPACES.has(parts[0])) return path;
|
|
841
|
+
let value = locale;
|
|
842
|
+
for (const part of parts) {
|
|
843
|
+
if (!value || typeof value !== "object") return path;
|
|
844
|
+
value = value[part];
|
|
845
|
+
}
|
|
846
|
+
if (typeof value !== "string") return path;
|
|
847
|
+
return value.replace(/\{(\w+)\}/gu, (_, key) => `${options?.[key] ?? `{${key}}`}`);
|
|
848
|
+
};
|
|
849
|
+
var buildTranslator = (locale) => (path, options) => translate(path, options, unref(locale));
|
|
850
|
+
var buildLocaleContext = (locale) => {
|
|
851
|
+
const localeRef = isRef(locale) ? locale : ref(locale);
|
|
852
|
+
return {
|
|
853
|
+
locale: localeRef,
|
|
854
|
+
lang: computed(() => localeRef.value.name),
|
|
855
|
+
t: buildTranslator(localeRef)
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
var localeContextKey = Symbol("docsLocaleContextKey");
|
|
859
|
+
var provideLocale = (locale, app) => {
|
|
860
|
+
const localeRef = isRef(locale) ? locale : ref(locale);
|
|
861
|
+
if (app) app.provide(localeContextKey, localeRef);
|
|
862
|
+
else provide(localeContextKey, localeRef);
|
|
863
|
+
return localeRef;
|
|
864
|
+
};
|
|
865
|
+
var useLocale = (override) => {
|
|
866
|
+
const inherited = inject(localeContextKey, ref());
|
|
867
|
+
return buildLocaleContext(computed(() => unref(override) || inherited.value || enUS));
|
|
868
|
+
};
|
|
869
|
+
//#endregion
|
|
870
|
+
export { buildLocaleContext, buildTranslator, createLocale, enUS, localeContextKey, provideLocale, resolveLocale, useLocale, zhCN };
|