@mohou/panel 1.0.20
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 +8 -0
- package/lib/types/chrome/hue.d.ts +3 -0
- package/lib/types/chrome/hue.d.ts.map +1 -0
- package/lib/types/gallery/card-style.d.ts +8 -0
- package/lib/types/gallery/card-style.d.ts.map +1 -0
- package/lib/types/gallery/client.d.ts +20 -0
- package/lib/types/gallery/client.d.ts.map +1 -0
- package/lib/types/gallery/desk.d.ts +16 -0
- package/lib/types/gallery/desk.d.ts.map +1 -0
- package/lib/types/gallery/list.d.ts +37 -0
- package/lib/types/gallery/list.d.ts.map +1 -0
- package/lib/types/gallery/sort.d.ts +24 -0
- package/lib/types/gallery/sort.d.ts.map +1 -0
- package/lib/types/gallery/state.d.ts +90 -0
- package/lib/types/gallery/state.d.ts.map +1 -0
- package/lib/types/gallery/tabs.d.ts +45 -0
- package/lib/types/gallery/tabs.d.ts.map +1 -0
- package/lib/types/gallery/view.d.ts +57 -0
- package/lib/types/gallery/view.d.ts.map +1 -0
- package/lib/types/history/client.d.ts +25 -0
- package/lib/types/history/client.d.ts.map +1 -0
- package/lib/types/history/state.d.ts +39 -0
- package/lib/types/history/state.d.ts.map +1 -0
- package/lib/types/history/view.d.ts +15 -0
- package/lib/types/history/view.d.ts.map +1 -0
- package/lib/types/index.d.ts +24 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/labels.d.ts +267 -0
- package/lib/types/labels.d.ts.map +1 -0
- package/lib/types/settings/author-mcp-view.d.ts +15 -0
- package/lib/types/settings/author-mcp-view.d.ts.map +1 -0
- package/lib/types/settings/author-mcp.d.ts +4 -0
- package/lib/types/settings/author-mcp.d.ts.map +1 -0
- package/lib/types/settings/client.d.ts +198 -0
- package/lib/types/settings/client.d.ts.map +1 -0
- package/lib/types/settings/credentials-view.d.ts +15 -0
- package/lib/types/settings/credentials-view.d.ts.map +1 -0
- package/lib/types/settings/form.d.ts +27 -0
- package/lib/types/settings/form.d.ts.map +1 -0
- package/lib/types/settings/install-row.d.ts +10 -0
- package/lib/types/settings/install-row.d.ts.map +1 -0
- package/lib/types/settings/mcp-view.d.ts +14 -0
- package/lib/types/settings/mcp-view.d.ts.map +1 -0
- package/lib/types/settings/skill-dirs.d.ts +6 -0
- package/lib/types/settings/skill-dirs.d.ts.map +1 -0
- package/lib/types/settings/skill-install.d.ts +13 -0
- package/lib/types/settings/skill-install.d.ts.map +1 -0
- package/lib/types/settings/state.d.ts +94 -0
- package/lib/types/settings/state.d.ts.map +1 -0
- package/lib/types/settings/update-dialog.d.ts +56 -0
- package/lib/types/settings/update-dialog.d.ts.map +1 -0
- package/lib/types/settings/view.d.ts +26 -0
- package/lib/types/settings/view.d.ts.map +1 -0
- package/lib/types/storage/client.d.ts +15 -0
- package/lib/types/storage/client.d.ts.map +1 -0
- package/lib/types/storage/state.d.ts +42 -0
- package/lib/types/storage/state.d.ts.map +1 -0
- package/lib/types/storage/view.d.ts +16 -0
- package/lib/types/storage/view.d.ts.map +1 -0
- package/lib/types/surface/state.d.ts +42 -0
- package/lib/types/surface/state.d.ts.map +1 -0
- package/lib/types/surface/view.d.ts +34 -0
- package/lib/types/surface/view.d.ts.map +1 -0
- package/lib/types/theme/client.d.ts +45 -0
- package/lib/types/theme/client.d.ts.map +1 -0
- package/lib/types/theme/menu.d.ts +25 -0
- package/lib/types/theme/menu.d.ts.map +1 -0
- package/lib/types/theme/state.d.ts +46 -0
- package/lib/types/theme/state.d.ts.map +1 -0
- package/lib/types/theme/view.d.ts +16 -0
- package/lib/types/theme/view.d.ts.map +1 -0
- package/lib/types/ui/dialog.d.ts +12 -0
- package/lib/types/ui/dialog.d.ts.map +1 -0
- package/lib/types/ui/tooltip.d.ts +12 -0
- package/lib/types/ui/tooltip.d.ts.map +1 -0
- package/package.json +38 -0
- package/src/chrome/hue.ts +6 -0
- package/src/gallery/card-style.ts +27 -0
- package/src/gallery/client.ts +26 -0
- package/src/gallery/desk.tsx +54 -0
- package/src/gallery/list.ts +54 -0
- package/src/gallery/sort.ts +72 -0
- package/src/gallery/state.ts +229 -0
- package/src/gallery/tabs.ts +85 -0
- package/src/gallery/view.tsx +501 -0
- package/src/history/client.ts +27 -0
- package/src/history/state.ts +90 -0
- package/src/history/view.tsx +131 -0
- package/src/index.ts +61 -0
- package/src/labels.ts +536 -0
- package/src/settings/author-mcp-view.tsx +154 -0
- package/src/settings/author-mcp.ts +24 -0
- package/src/settings/client.ts +205 -0
- package/src/settings/credentials-view.tsx +195 -0
- package/src/settings/form.ts +27 -0
- package/src/settings/install-row.tsx +35 -0
- package/src/settings/mcp-view.tsx +793 -0
- package/src/settings/skill-dirs.ts +41 -0
- package/src/settings/skill-install.tsx +134 -0
- package/src/settings/state.ts +225 -0
- package/src/settings/update-dialog.tsx +207 -0
- package/src/settings/view.tsx +722 -0
- package/src/storage/client.ts +16 -0
- package/src/storage/state.ts +94 -0
- package/src/storage/view.tsx +190 -0
- package/src/surface/state.ts +72 -0
- package/src/surface/view.tsx +255 -0
- package/src/theme/client.ts +34 -0
- package/src/theme/menu.tsx +286 -0
- package/src/theme/state.ts +113 -0
- package/src/theme/view.tsx +73 -0
- package/src/ui/dialog.tsx +25 -0
- package/src/ui/tooltip.tsx +19 -0
package/src/labels.ts
ADDED
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
/** Locales the panel chrome speaks. No third locale. */
|
|
2
|
+
export const panelLocales = ['en', 'zh-CN'] as const
|
|
3
|
+
|
|
4
|
+
export type PanelLocale = (typeof panelLocales)[number]
|
|
5
|
+
|
|
6
|
+
export type PanelLabelMode = 'development' | 'production'
|
|
7
|
+
|
|
8
|
+
const en = {
|
|
9
|
+
'host-unreachable': 'Host is unreachable',
|
|
10
|
+
'gallery-empty': 'No apps yet',
|
|
11
|
+
'gallery-title': 'Library',
|
|
12
|
+
'gallery-count': '{n} apps',
|
|
13
|
+
'status-ready': 'Host ready',
|
|
14
|
+
'card-style': 'Card style',
|
|
15
|
+
'card-hero': 'Glow',
|
|
16
|
+
'card-stamp': 'Stamp',
|
|
17
|
+
'card-etch': 'Cutout',
|
|
18
|
+
'card-pulse': 'Firefly',
|
|
19
|
+
'card-list': 'List',
|
|
20
|
+
'card-glass': 'Glass',
|
|
21
|
+
'search-placeholder': 'Search mini apps',
|
|
22
|
+
'search-empty': 'No matching apps',
|
|
23
|
+
'list-failed': 'The app list failed',
|
|
24
|
+
'trash-failed': 'Trash failed to load',
|
|
25
|
+
'reload-failed': 'Reload failed',
|
|
26
|
+
'probe-ok': 'Healthy',
|
|
27
|
+
'probe-failed': 'Probe failed',
|
|
28
|
+
'history-empty': 'No history yet',
|
|
29
|
+
'history-failed': 'History failed to load',
|
|
30
|
+
'delete-confirm': 'Delete this app?',
|
|
31
|
+
'delete-failed': 'Delete failed',
|
|
32
|
+
'unsaved-confirm': 'Discard unsaved changes?',
|
|
33
|
+
'port-invalid': 'Port must be from 1024 to 65535',
|
|
34
|
+
'save-failed': 'Save failed',
|
|
35
|
+
'update-failed': 'Update check failed',
|
|
36
|
+
'storage-failed': 'Storage failed to load',
|
|
37
|
+
'storage-size-notice': 'The storage file is large ({table}). Ask an agent to help split the data.',
|
|
38
|
+
'restore-storage': 'Restore storage',
|
|
39
|
+
'restore-storage-confirm': 'Restore the last storage backup? This replaces the live database.',
|
|
40
|
+
'theme-save-failed': 'Theme pin failed to save',
|
|
41
|
+
search: 'Search',
|
|
42
|
+
open: 'Open',
|
|
43
|
+
'open-failed': 'Open failed',
|
|
44
|
+
'frame-pending': 'Opening…',
|
|
45
|
+
'close-tab': 'Close',
|
|
46
|
+
gallery: 'All',
|
|
47
|
+
delete: 'Delete',
|
|
48
|
+
cancel: 'Cancel',
|
|
49
|
+
confirm: 'Confirm',
|
|
50
|
+
restore: 'Restore',
|
|
51
|
+
language: 'Language',
|
|
52
|
+
port: 'Host port',
|
|
53
|
+
'port-help': 'Local HTTP port for the host: panel, app iframes, APIs, and MCP authoring. Changing it needs a host restart and an MCP connection update.',
|
|
54
|
+
'port-edit': 'Edit host port',
|
|
55
|
+
'port-lock': 'Lock host port',
|
|
56
|
+
'port-open-panel': 'Open in browser',
|
|
57
|
+
'port-panel-url': 'Panel',
|
|
58
|
+
'port-mcp-url': 'MCP authoring',
|
|
59
|
+
save: 'Save',
|
|
60
|
+
saving: 'Saving…',
|
|
61
|
+
saved: 'Saved',
|
|
62
|
+
probe: 'Probe',
|
|
63
|
+
'restart-required': 'The host must restart before the new port or runtime is used.',
|
|
64
|
+
'restart-mcp-hint': 'After restart, open Agent settings and update the MCP authoring connection so assistants use the new port.',
|
|
65
|
+
'restart-runtime-hint': 'Mini-apps keep the previous runtime until the host restarts.',
|
|
66
|
+
'restart-runtime-pending': 'Save, then restart the host. Apps still use the previous runtime until then.',
|
|
67
|
+
'restart-host': 'Restart host',
|
|
68
|
+
'restart-wait': 'Restarting the host…',
|
|
69
|
+
'restart-failed': 'The host did not restart.',
|
|
70
|
+
dismiss: 'Dismiss',
|
|
71
|
+
'follow-host': 'Follow host',
|
|
72
|
+
'app-file': 'App file',
|
|
73
|
+
'clear-pin': 'Clear',
|
|
74
|
+
refresh: 'Refresh',
|
|
75
|
+
reload: 'Reload',
|
|
76
|
+
'settings-close': 'Close settings',
|
|
77
|
+
'section-appearance': 'Appearance',
|
|
78
|
+
'section-workbench': 'Workbench',
|
|
79
|
+
'desk-switch': 'Workbench',
|
|
80
|
+
'workbench-builtin': 'Library',
|
|
81
|
+
'workbench-mark': 'Workbench',
|
|
82
|
+
'set-default-workbench': 'Set as home',
|
|
83
|
+
'current-default-workbench': 'Current home',
|
|
84
|
+
'clear-default-workbench': 'Clear home',
|
|
85
|
+
'open-workbench-tab': 'Open as tab',
|
|
86
|
+
'open-workbench-tab-now': 'Custom home',
|
|
87
|
+
'open-workbench-tab-more': 'More in a tab',
|
|
88
|
+
'open-workbench-tab-hint': 'Open this workbench in a tab for storage, history, and theme',
|
|
89
|
+
'section-network': 'Network',
|
|
90
|
+
'section-runtime': 'Runtime',
|
|
91
|
+
'section-model': 'Mini-app model',
|
|
92
|
+
'section-agent': 'Agent',
|
|
93
|
+
'section-about': 'About',
|
|
94
|
+
'section-mcp': 'MCP',
|
|
95
|
+
'section-credentials': 'Credentials',
|
|
96
|
+
'credentials-empty': 'No credentials yet. Add one and a server can name it instead of holding the secret.',
|
|
97
|
+
'credentials-add': 'Add credential',
|
|
98
|
+
'credentials-new': 'New credential',
|
|
99
|
+
'credentials-edit': 'Edit credential',
|
|
100
|
+
'credentials-name': 'Name',
|
|
101
|
+
'credentials-name-hint': 'e.g. github',
|
|
102
|
+
'credentials-description': 'Description',
|
|
103
|
+
'credentials-desc-hint': 'What this account is for',
|
|
104
|
+
'credentials-secret': 'Secret',
|
|
105
|
+
'credentials-secret-hint': 'Paste the token',
|
|
106
|
+
'credentials-replace-hint': 'Leave the secret empty to keep the stored one.',
|
|
107
|
+
'credentials-need-name': 'Give the credential a name first.',
|
|
108
|
+
'credentials-need-secret': 'A new credential needs a secret.',
|
|
109
|
+
'credentials-save': 'Save',
|
|
110
|
+
'credentials-saved': 'Saved on this machine only.',
|
|
111
|
+
'credentials-saved-description': 'Description saved. The stored secret is unchanged.',
|
|
112
|
+
'credentials-read-only': 'This store cannot be written from here.',
|
|
113
|
+
'credentials-load-failed': 'Credentials could not be read.',
|
|
114
|
+
'credentials-save-failed': 'The credential was not saved.',
|
|
115
|
+
'credentials-delete-confirm': 'Delete this credential? Servers that name it stop starting.',
|
|
116
|
+
'credentials-reference': 'A server references this as {reference}',
|
|
117
|
+
'mcp-reference-hint': 'A value may be ${env:NAME} or ${credential:NAME}',
|
|
118
|
+
'mcp-unstarted': 'Not started',
|
|
119
|
+
'mcp-unresolved-hint': 'A server below is not running because a value names something missing. Add it in Credentials, then restart the host.',
|
|
120
|
+
'mcp-add': 'Add server',
|
|
121
|
+
'mcp-new': 'New server',
|
|
122
|
+
'mcp-edit': 'Edit server',
|
|
123
|
+
'mcp-check': 'Check connection',
|
|
124
|
+
'mcp-check-ok': 'Connected. {n} tools.',
|
|
125
|
+
'mcp-need-name': 'Give the server a name first.',
|
|
126
|
+
'mcp-save': 'Add server',
|
|
127
|
+
'mcp-empty': 'No servers yet. Add one to give apps external tools.',
|
|
128
|
+
'mcp-transport': 'Transport',
|
|
129
|
+
'mcp-stdio': 'Local command',
|
|
130
|
+
'mcp-sse': 'SSE',
|
|
131
|
+
'mcp-http': 'HTTP',
|
|
132
|
+
'mcp-name': 'Name',
|
|
133
|
+
'mcp-description': 'Description',
|
|
134
|
+
'mcp-command': 'Command',
|
|
135
|
+
'mcp-args': 'Arguments',
|
|
136
|
+
'mcp-url': 'URL',
|
|
137
|
+
'mcp-env': 'Environment',
|
|
138
|
+
'mcp-tools': 'Tools',
|
|
139
|
+
'mcp-schema-input': 'Input',
|
|
140
|
+
'mcp-schema-output': 'Output',
|
|
141
|
+
'mcp-schema-required': 'required',
|
|
142
|
+
'mcp-schema-no-fields': 'This schema declares no fields.',
|
|
143
|
+
'mcp-connected': 'Connected',
|
|
144
|
+
'mcp-offline': 'Not connected',
|
|
145
|
+
'mcp-saved': 'Saved. Apps use this file the next time the host starts.',
|
|
146
|
+
'mcp-name-hint': 'e.g. filesystem',
|
|
147
|
+
'mcp-desc-hint': 'What this server does',
|
|
148
|
+
'mcp-command-hint': 'e.g. npx',
|
|
149
|
+
'mcp-args-hint': '-y @mcp/server',
|
|
150
|
+
'mcp-url-hint': 'https://example.com/mcp',
|
|
151
|
+
'mcp-env-hint': 'KEY=value, one per line',
|
|
152
|
+
'mcp-headers': 'Headers',
|
|
153
|
+
'mcp-headers-hint': 'Authorization=Bearer token',
|
|
154
|
+
'mcp-authoring': 'Install MCP authoring tools',
|
|
155
|
+
'mcp-authoring-help': 'Lets Cursor, Pi, and similar assistants create and edit mini-apps on this machine.',
|
|
156
|
+
'mcp-authoring-generate': 'Generate connection',
|
|
157
|
+
'mcp-authoring-install': 'Install connection',
|
|
158
|
+
'mcp-authoring-update-install': 'Update connection',
|
|
159
|
+
'mcp-authoring-failed': 'The connection could not be installed.',
|
|
160
|
+
'mcp-authoring-blurb': 'Create and edit mini-apps on this machine.',
|
|
161
|
+
'agent-apps-help': 'Mini-apps use this model for chat and agents.',
|
|
162
|
+
'agent-others': 'App authoring agents',
|
|
163
|
+
'agent-others-help': 'Install the writing skill and tools on agents.',
|
|
164
|
+
installing: 'Installing',
|
|
165
|
+
'skill-help': 'Teaches the assistant how to write mini-apps. Choose where to install.',
|
|
166
|
+
'skill-install': 'Install writing skill',
|
|
167
|
+
'skill-installed': 'Installed',
|
|
168
|
+
'skill-update': 'Update available',
|
|
169
|
+
'skill-update-install': 'Update writing skill',
|
|
170
|
+
'skill-version': 'Version {n}',
|
|
171
|
+
'skill-reinstall': 'Reinstall',
|
|
172
|
+
'skill-failed': 'The skill could not be installed.',
|
|
173
|
+
'skill-missing-home': 'Not detected',
|
|
174
|
+
'skill-open': 'Open',
|
|
175
|
+
'skill-custom': 'Custom folder',
|
|
176
|
+
'skill-custom-hint': 'e.g. ~/.agents/skills or project/.agents/skills',
|
|
177
|
+
'skill-custom-format': 'The last folder must be named skills.',
|
|
178
|
+
'skill-add-dir': 'Add',
|
|
179
|
+
'mcp-copy': 'Copy',
|
|
180
|
+
'mcp-copied': 'Copied',
|
|
181
|
+
'mcp-paste': 'Paste',
|
|
182
|
+
'mcp-from-pi': 'From Pi',
|
|
183
|
+
'mcp-from-file': 'Choose file',
|
|
184
|
+
'mcp-import': 'Import',
|
|
185
|
+
'mcp-admit': 'Recognize',
|
|
186
|
+
'mcp-import-none': 'No servers were found in that config.',
|
|
187
|
+
'mcp-load-failed': 'The MCP file could not be read.',
|
|
188
|
+
'mcp-running': 'Running',
|
|
189
|
+
'mcp-stopped': 'Stopped',
|
|
190
|
+
'mcp-more': '{n} more',
|
|
191
|
+
'mcp-tool-empty': 'This tool has no description.',
|
|
192
|
+
'mcp-pick': 'Choose servers to import',
|
|
193
|
+
'model-empty': 'This runtime does not list models.',
|
|
194
|
+
'runtime-missing': 'No runtime is registered.',
|
|
195
|
+
'update-checking': 'Checking…',
|
|
196
|
+
'update-ok': 'This version is current.',
|
|
197
|
+
'update-available': 'A newer version is available.',
|
|
198
|
+
'update-current': 'This version: {n}',
|
|
199
|
+
'update-newest': 'Latest: {n}',
|
|
200
|
+
'lang-zh': 'Chinese',
|
|
201
|
+
'lang-en': 'English',
|
|
202
|
+
'theme-system': 'System',
|
|
203
|
+
'theme-light': 'Light',
|
|
204
|
+
'theme-dark': 'Dark',
|
|
205
|
+
'scope-global': 'Global',
|
|
206
|
+
'scope-app': 'This app',
|
|
207
|
+
'chip-system': 'System',
|
|
208
|
+
'chip-custom': 'Custom',
|
|
209
|
+
'chip-app': 'App',
|
|
210
|
+
'follow-global': 'Follow global',
|
|
211
|
+
trash: 'Trash',
|
|
212
|
+
'close-panel': 'Close panel',
|
|
213
|
+
appearance: 'Appearance',
|
|
214
|
+
'theme-app-hint': 'Pin a palette for this app so it stays put when the host palette changes. Light and dark still follow the host.',
|
|
215
|
+
palette: 'Palette',
|
|
216
|
+
provider: 'Provider',
|
|
217
|
+
model: 'Model',
|
|
218
|
+
about: 'About',
|
|
219
|
+
'product-name': 'Mohou',
|
|
220
|
+
'product-meaning': 'Mohou is the small monkey once kept to grind ink. It is small, stays at hand, and serves one task.\nThis product is that set of tools. You bring the idea. The language model writes the implementation. Mohou supplies the brush, the ink, the paper, the inkstone, the library, and the shelf.',
|
|
221
|
+
update: 'Check for updates',
|
|
222
|
+
'update-install': 'Install update',
|
|
223
|
+
'update-install-failed': 'The update could not be installed.',
|
|
224
|
+
'update-card-title': 'Update available',
|
|
225
|
+
'update-card-current': 'Current',
|
|
226
|
+
'update-card-latest': 'Latest',
|
|
227
|
+
'update-channel-tarball': 'Local package',
|
|
228
|
+
'update-channel-registry': 'Registry',
|
|
229
|
+
'update-card-note': 'The window restarts during the update and comes back here. Usually seconds, at most two minutes. Do not close it.',
|
|
230
|
+
'update-installing-title': 'Installing {n}',
|
|
231
|
+
'update-installing-elapsed': '{n} elapsed',
|
|
232
|
+
'update-installing-note': 'The window restarts by itself and comes back here. Do not close it.',
|
|
233
|
+
'update-failed-title': 'The update did not finish',
|
|
234
|
+
'update-failed-back': 'Back on {n}, still running.',
|
|
235
|
+
'update-reason-timeout': 'The install ran past two minutes.',
|
|
236
|
+
'update-reason-exit': 'The installer exited with code {n}.',
|
|
237
|
+
'update-reason-exit-plain': 'The installer exited with an error.',
|
|
238
|
+
'update-reason-prepare': 'The install prefix was not ready, so the update did not start.',
|
|
239
|
+
'update-reason-closed': 'The window closed, so the update was cancelled.',
|
|
240
|
+
'update-reason-leftover': 'An earlier update did not finish.',
|
|
241
|
+
'update-reason-verify': 'The installed version is not the one that was asked for.',
|
|
242
|
+
'update-reason-boot': 'The new version did not start.',
|
|
243
|
+
'update-log': 'Log: {n}',
|
|
244
|
+
'update-card-close': 'Close',
|
|
245
|
+
'update-card-retry': 'Install again',
|
|
246
|
+
'update-card-done-title': 'Updated to {n}',
|
|
247
|
+
'update-card-done-note': 'The new version is running.',
|
|
248
|
+
'update-card-ok': 'OK',
|
|
249
|
+
settings: 'Settings',
|
|
250
|
+
history: 'History',
|
|
251
|
+
storage: 'Storage',
|
|
252
|
+
theme: 'Theme',
|
|
253
|
+
'pane-close': 'Close',
|
|
254
|
+
'history-pick': 'Select a commit to see what changed',
|
|
255
|
+
'storage-empty-rows': 'This table has no rows',
|
|
256
|
+
'storage-preview': 'Preview',
|
|
257
|
+
'storage-raw': 'Raw',
|
|
258
|
+
} as const
|
|
259
|
+
|
|
260
|
+
const zhCN = {
|
|
261
|
+
'host-unreachable': '无法连接宿主',
|
|
262
|
+
'gallery-empty': '还没有应用',
|
|
263
|
+
'gallery-title': '小程序库',
|
|
264
|
+
'gallery-count': '共 {n} 个小程序',
|
|
265
|
+
'status-ready': '系统运行正常',
|
|
266
|
+
'card-style': '卡片样式',
|
|
267
|
+
'card-hero': '光晕',
|
|
268
|
+
'card-stamp': '印章',
|
|
269
|
+
'card-etch': '剪影',
|
|
270
|
+
'card-pulse': '萤火',
|
|
271
|
+
'card-list': '列表',
|
|
272
|
+
'card-glass': '玻璃',
|
|
273
|
+
'search-placeholder': '搜索小程序',
|
|
274
|
+
'search-empty': '没有匹配的应用',
|
|
275
|
+
'list-failed': '应用列表加载失败',
|
|
276
|
+
'trash-failed': '回收站加载失败',
|
|
277
|
+
'reload-failed': '重新加载失败',
|
|
278
|
+
'probe-ok': '正常',
|
|
279
|
+
'probe-failed': '探测失败',
|
|
280
|
+
'history-empty': '还没有历史',
|
|
281
|
+
'history-failed': '历史加载失败',
|
|
282
|
+
'delete-confirm': '删除这个应用?',
|
|
283
|
+
'delete-failed': '删除失败',
|
|
284
|
+
'unsaved-confirm': '放弃未保存的修改?',
|
|
285
|
+
'port-invalid': '端口必须在 1024 到 65535 之间',
|
|
286
|
+
'save-failed': '保存失败',
|
|
287
|
+
'update-failed': '更新检查失败',
|
|
288
|
+
'storage-failed': '存储加载失败',
|
|
289
|
+
'storage-size-notice': '数据存储文件过大({table})。可让智能体帮助拆分数据。',
|
|
290
|
+
'restore-storage': '恢复存储',
|
|
291
|
+
'restore-storage-confirm': '还原上次的存储备份?当前数据库会被换掉。',
|
|
292
|
+
'theme-save-failed': '主题固定失败',
|
|
293
|
+
search: '搜索',
|
|
294
|
+
open: '打开',
|
|
295
|
+
'open-failed': '打开失败',
|
|
296
|
+
'frame-pending': '正在打开…',
|
|
297
|
+
'close-tab': '关闭',
|
|
298
|
+
gallery: '全部',
|
|
299
|
+
delete: '删除',
|
|
300
|
+
cancel: '取消',
|
|
301
|
+
confirm: '确认',
|
|
302
|
+
restore: '还原',
|
|
303
|
+
language: '语言',
|
|
304
|
+
port: '宿主端口',
|
|
305
|
+
'port-help': '本机 Host 的 HTTP 端口:面板、小程序、接口和 MCP 创作工具都走这个地址。改了要重启宿主,并更新 MCP 创作连接。',
|
|
306
|
+
'port-edit': '修改宿主端口',
|
|
307
|
+
'port-lock': '锁定宿主端口',
|
|
308
|
+
'port-open-panel': '在浏览器打开',
|
|
309
|
+
'port-panel-url': '面板',
|
|
310
|
+
'port-mcp-url': 'MCP 创作',
|
|
311
|
+
save: '保存',
|
|
312
|
+
saving: '保存中…',
|
|
313
|
+
saved: '已保存',
|
|
314
|
+
probe: '探测',
|
|
315
|
+
'restart-required': '需要重启宿主。新端口或新运行时要等宿主下次启动才接上。',
|
|
316
|
+
'restart-mcp-hint': '重启后请到「智能体」更新 MCP 创作工具连接,让助手用上新端口。',
|
|
317
|
+
'restart-runtime-hint': '小程序会继续用旧运行时,直到宿主重启。',
|
|
318
|
+
'restart-runtime-pending': '请先保存,再重启宿主。在此之前小程序仍用旧运行时。',
|
|
319
|
+
'restart-host': '重启宿主',
|
|
320
|
+
'restart-wait': '正在重启宿主…',
|
|
321
|
+
'restart-failed': '宿主没能重启。',
|
|
322
|
+
dismiss: '关闭',
|
|
323
|
+
'follow-host': '跟随宿主',
|
|
324
|
+
'app-file': '应用文件',
|
|
325
|
+
'clear-pin': '清除',
|
|
326
|
+
refresh: '刷新',
|
|
327
|
+
reload: '重新加载',
|
|
328
|
+
'settings-close': '关闭设置',
|
|
329
|
+
'section-appearance': '外观',
|
|
330
|
+
'section-workbench': '工作台',
|
|
331
|
+
'desk-switch': '工作台',
|
|
332
|
+
'workbench-builtin': '小程序库',
|
|
333
|
+
'workbench-mark': '工作台',
|
|
334
|
+
'set-default-workbench': '设为首页',
|
|
335
|
+
'current-default-workbench': '当前首页',
|
|
336
|
+
'clear-default-workbench': '取消首页',
|
|
337
|
+
'open-workbench-tab': '在标签中打开',
|
|
338
|
+
'open-workbench-tab-now': '当前为自定义首页',
|
|
339
|
+
'open-workbench-tab-more': '更多个性化设置',
|
|
340
|
+
'open-workbench-tab-hint': '在独立标签中打开此工作台,可查看存储、历史和主题',
|
|
341
|
+
'section-network': '网络',
|
|
342
|
+
'section-runtime': '运行时',
|
|
343
|
+
'section-model': '小程序模型',
|
|
344
|
+
'section-agent': '智能体',
|
|
345
|
+
'section-about': '关于',
|
|
346
|
+
'section-mcp': 'MCP',
|
|
347
|
+
'section-credentials': '凭据',
|
|
348
|
+
'credentials-empty': '还没有凭据。添加一个,服务器配置里就不用直接写密钥了。',
|
|
349
|
+
'credentials-add': '添加凭据',
|
|
350
|
+
'credentials-new': '新建凭据',
|
|
351
|
+
'credentials-edit': '编辑凭据',
|
|
352
|
+
'credentials-name': '名称',
|
|
353
|
+
'credentials-name-hint': '例如 github',
|
|
354
|
+
'credentials-description': '描述',
|
|
355
|
+
'credentials-desc-hint': '这个账号是做什么的',
|
|
356
|
+
'credentials-secret': '密钥',
|
|
357
|
+
'credentials-secret-hint': '粘贴 token',
|
|
358
|
+
'credentials-replace-hint': '密钥留空表示不改动已保存的那个。',
|
|
359
|
+
'credentials-need-name': '先给凭据起个名字。',
|
|
360
|
+
'credentials-need-secret': '新建凭据必须填密钥。',
|
|
361
|
+
'credentials-save': '保存',
|
|
362
|
+
'credentials-saved': '只保存在这台机器上。',
|
|
363
|
+
'credentials-saved-description': '描述已保存,已存的密钥没有改动。',
|
|
364
|
+
'credentials-read-only': '这个存储不能在这里写入。',
|
|
365
|
+
'credentials-load-failed': '读取凭据失败。',
|
|
366
|
+
'credentials-save-failed': '凭据没有保存。',
|
|
367
|
+
'credentials-delete-confirm': '删除这个凭据?引用它的服务器将无法启动。',
|
|
368
|
+
'credentials-reference': '服务器通过 {reference} 引用它',
|
|
369
|
+
'mcp-reference-hint': '值可以写成 ${env:NAME} 或 ${credential:NAME}',
|
|
370
|
+
'mcp-unstarted': '未启动',
|
|
371
|
+
'mcp-unresolved-hint': '下面有服务器没起来:某个值指向的东西不存在。到「凭据」里补上,然后重启宿主。',
|
|
372
|
+
'mcp-add': '添加服务器',
|
|
373
|
+
'mcp-new': '新建服务器',
|
|
374
|
+
'mcp-edit': '编辑服务器',
|
|
375
|
+
'mcp-check': '试连接',
|
|
376
|
+
'mcp-check-ok': '已连接,{n} 个工具。',
|
|
377
|
+
'mcp-need-name': '先填名称。',
|
|
378
|
+
'mcp-save': '添加',
|
|
379
|
+
'mcp-empty': '还没有服务器。添加一台,应用才能调用外部工具。',
|
|
380
|
+
'mcp-transport': '传输',
|
|
381
|
+
'mcp-stdio': '本地命令',
|
|
382
|
+
'mcp-sse': 'SSE',
|
|
383
|
+
'mcp-http': 'HTTP',
|
|
384
|
+
'mcp-name': '名称',
|
|
385
|
+
'mcp-description': '说明',
|
|
386
|
+
'mcp-command': '命令',
|
|
387
|
+
'mcp-args': '参数',
|
|
388
|
+
'mcp-url': '地址',
|
|
389
|
+
'mcp-env': '环境变量',
|
|
390
|
+
'mcp-tools': '工具',
|
|
391
|
+
'mcp-schema-input': '输入',
|
|
392
|
+
'mcp-schema-output': '输出',
|
|
393
|
+
'mcp-schema-required': '必填',
|
|
394
|
+
'mcp-schema-no-fields': '这个 schema 没有声明字段。',
|
|
395
|
+
'mcp-connected': '已连接',
|
|
396
|
+
'mcp-offline': '未连接',
|
|
397
|
+
'mcp-saved': '已保存。应用在宿主下次启动后使用这份文件。',
|
|
398
|
+
'mcp-name-hint': '例如 filesystem',
|
|
399
|
+
'mcp-desc-hint': '这台服务器做什么',
|
|
400
|
+
'mcp-command-hint': '例如 npx',
|
|
401
|
+
'mcp-args-hint': '-y @mcp/server',
|
|
402
|
+
'mcp-url-hint': 'https://example.com/mcp',
|
|
403
|
+
'mcp-env-hint': '每行一个 KEY=value',
|
|
404
|
+
'mcp-headers': '请求头',
|
|
405
|
+
'mcp-headers-hint': 'Authorization=Bearer 令牌',
|
|
406
|
+
'mcp-authoring': '安装 MCP 创作工具',
|
|
407
|
+
'mcp-authoring-help': '让 Cursor、Pi 等助手在这台机器上创建和修改小程序。',
|
|
408
|
+
'mcp-authoring-generate': '生成连接配置',
|
|
409
|
+
'mcp-authoring-install': '安装连接',
|
|
410
|
+
'mcp-authoring-update-install': '更新连接',
|
|
411
|
+
'mcp-authoring-failed': '连接没能装上。',
|
|
412
|
+
'mcp-authoring-blurb': '在这台机器上创建和修改小程序。',
|
|
413
|
+
'agent-apps-help': '小程序里的对话和代理会用这一套模型。',
|
|
414
|
+
'agent-others': '对接App创作智能体',
|
|
415
|
+
'agent-others-help': '给智能体安装写作技能和工具。',
|
|
416
|
+
installing: '安装中',
|
|
417
|
+
'skill-help': '教助手怎么写小程序。选择要装到哪些助手。',
|
|
418
|
+
'skill-install': '安装写作技能',
|
|
419
|
+
'skill-installed': '已安装',
|
|
420
|
+
'skill-update': '可更新',
|
|
421
|
+
'skill-update-install': '更新写作技能',
|
|
422
|
+
'skill-version': '版本 {n}',
|
|
423
|
+
'skill-reinstall': '重新安装',
|
|
424
|
+
'skill-failed': '技能没能装上。',
|
|
425
|
+
'skill-missing-home': '未检测到',
|
|
426
|
+
'skill-open': '打开',
|
|
427
|
+
'skill-custom': '自定义目录',
|
|
428
|
+
'skill-custom-hint': '例如 ~/.agents/skills 或 项目/.agents/skills',
|
|
429
|
+
'skill-custom-format': '最后一层目录必须叫 skills。',
|
|
430
|
+
'skill-add-dir': '添加',
|
|
431
|
+
'mcp-copy': '复制',
|
|
432
|
+
'mcp-copied': '已复制',
|
|
433
|
+
'mcp-paste': '粘贴配置',
|
|
434
|
+
'mcp-from-pi': '从 Pi 导入',
|
|
435
|
+
'mcp-from-file': '选择文件',
|
|
436
|
+
'mcp-import': '导入',
|
|
437
|
+
'mcp-admit': '识别',
|
|
438
|
+
'mcp-import-none': '这份配置里没有读到服务器。',
|
|
439
|
+
'mcp-load-failed': 'MCP 配置读不出来。',
|
|
440
|
+
'mcp-running': '运行中',
|
|
441
|
+
'mcp-stopped': '已停止',
|
|
442
|
+
'mcp-more': '还有 {n}',
|
|
443
|
+
'mcp-tool-empty': '这个工具没有说明。',
|
|
444
|
+
'mcp-pick': '选择要导入的服务器',
|
|
445
|
+
'model-empty': '当前运行时没有模型列表。',
|
|
446
|
+
'runtime-missing': '没有已注册的运行时。',
|
|
447
|
+
'update-checking': '正在检查…',
|
|
448
|
+
'update-ok': '已是最新版本。',
|
|
449
|
+
'update-available': '有新版本。',
|
|
450
|
+
'update-current': '当前 {n}',
|
|
451
|
+
'update-newest': '最新 {n}',
|
|
452
|
+
'lang-zh': '中文',
|
|
453
|
+
'lang-en': 'English',
|
|
454
|
+
'theme-system': '跟随系统',
|
|
455
|
+
'theme-light': '浅色',
|
|
456
|
+
'theme-dark': '深色',
|
|
457
|
+
'scope-global': '全局',
|
|
458
|
+
'scope-app': '当前应用',
|
|
459
|
+
'chip-system': '系统',
|
|
460
|
+
'chip-custom': '自定义',
|
|
461
|
+
'chip-app': '应用',
|
|
462
|
+
'follow-global': '跟随全局',
|
|
463
|
+
trash: '回收站',
|
|
464
|
+
'close-panel': '关闭面板',
|
|
465
|
+
appearance: '外观',
|
|
466
|
+
'theme-app-hint': '可为当前小程序固定一套色板,不随宿主全局色板改动。浅色/深色仍跟随宿主。',
|
|
467
|
+
palette: '配色',
|
|
468
|
+
provider: '运行时',
|
|
469
|
+
model: '模型',
|
|
470
|
+
about: '关于',
|
|
471
|
+
'product-name': '墨猴',
|
|
472
|
+
'product-meaning': '墨猴是旧时帮人磨墨的小猴。它小,在手边,专门伺候一件事。\n本产品是交给用户的一套工具。用户给出想法,语言模型负责实现,墨猴提供笔墨纸砚、藏书阁和书架。',
|
|
473
|
+
update: '检查更新',
|
|
474
|
+
'update-install': '安装更新',
|
|
475
|
+
'update-install-failed': '更新没能装上。',
|
|
476
|
+
'update-card-title': '有新版本',
|
|
477
|
+
'update-card-current': '当前',
|
|
478
|
+
'update-card-latest': '最新',
|
|
479
|
+
'update-channel-tarball': '本地包',
|
|
480
|
+
'update-channel-registry': '在线仓库',
|
|
481
|
+
'update-card-note': '更新时窗口会重启,之后自动回到这里。通常几秒,最多两分钟,请勿关闭。',
|
|
482
|
+
'update-installing-title': '正在安装 {n}',
|
|
483
|
+
'update-installing-elapsed': '已用 {n}',
|
|
484
|
+
'update-installing-note': '窗口会自动重启并回到这里,请勿关闭。',
|
|
485
|
+
'update-failed-title': '更新没有完成',
|
|
486
|
+
'update-failed-back': '已回到 {n},继续运行。',
|
|
487
|
+
'update-reason-timeout': '安装超过两分钟没有完成。',
|
|
488
|
+
'update-reason-exit': '安装程序退出码 {n}。',
|
|
489
|
+
'update-reason-exit-plain': '安装程序出错退出。',
|
|
490
|
+
'update-reason-prepare': '安装目录还没准备好,更新没有开始。',
|
|
491
|
+
'update-reason-closed': '窗口被关闭,本次更新已取消。',
|
|
492
|
+
'update-reason-leftover': '上一次更新没有完成。',
|
|
493
|
+
'update-reason-verify': '装上的版本不是要更新的那个。',
|
|
494
|
+
'update-reason-boot': '新版本没能启动。',
|
|
495
|
+
'update-log': '日志:{n}',
|
|
496
|
+
'update-card-close': '关闭',
|
|
497
|
+
'update-card-retry': '重新安装',
|
|
498
|
+
'update-card-done-title': '已更新到 {n}',
|
|
499
|
+
'update-card-done-note': '新版本已经在运行。',
|
|
500
|
+
'update-card-ok': '好',
|
|
501
|
+
settings: '设置',
|
|
502
|
+
history: '历史',
|
|
503
|
+
storage: '存储',
|
|
504
|
+
theme: '主题',
|
|
505
|
+
'pane-close': '关闭',
|
|
506
|
+
'history-pick': '选择一条记录查看改动',
|
|
507
|
+
'storage-empty-rows': '这张表没有记录',
|
|
508
|
+
'storage-preview': '预览',
|
|
509
|
+
'storage-raw': '原始数据',
|
|
510
|
+
} as const satisfies Record<keyof typeof en, string>
|
|
511
|
+
|
|
512
|
+
export type PanelLabelKey = keyof typeof en
|
|
513
|
+
|
|
514
|
+
const tables: Record<PanelLocale, Record<PanelLabelKey, string>> = {
|
|
515
|
+
en,
|
|
516
|
+
'zh-CN': zhCN,
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Look up one panel chrome string. A missing key fails in development and falls back to the key in production.
|
|
521
|
+
* App content is not translated here.
|
|
522
|
+
* @param locale - `en` or `zh-CN`
|
|
523
|
+
* @param key - chrome key
|
|
524
|
+
* @param mode - development fails closed
|
|
525
|
+
*/
|
|
526
|
+
export function panelText(locale: string, key: string, mode: PanelLabelMode): string {
|
|
527
|
+
if (!isPanelLocale(locale)) throw new Error(`panel locale is not supported: ${locale}`)
|
|
528
|
+
const value = tables[locale][key as PanelLabelKey]
|
|
529
|
+
if (value !== undefined) return value
|
|
530
|
+
if (mode === 'development') throw new Error(`missing panel label: ${key}`)
|
|
531
|
+
return key
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export function isPanelLocale(value: string): value is PanelLocale {
|
|
535
|
+
return (panelLocales as readonly string[]).includes(value)
|
|
536
|
+
}
|