omp-onlyne 0.0.0-stage → 0.2.0
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/AGENTS.sample.md +27 -0
- package/LICENSE +21 -0
- package/README.md +140 -2
- package/index.ts +55 -0
- package/package.json +62 -5
- package/src/acquire.ts +182 -0
- package/src/binding.ts +132 -0
- package/src/bridge-text.ts +145 -0
- package/src/config.ts +332 -0
- package/src/decider-text.ts +438 -0
- package/src/decider.ts +2233 -0
- package/src/drafts.ts +57 -0
- package/src/handshake.ts +291 -0
- package/src/host-text.ts +92 -0
- package/src/messages.ts +427 -0
- package/src/node.ts +139 -0
- package/src/resources.ts +36 -0
- package/src/runtime.ts +676 -0
- package/src/store.ts +189 -0
- package/src/tern.ts +66 -0
- package/src/todo-native.ts +230 -0
- package/src/todo.ts +896 -0
- package/src/tool-text.ts +167 -0
- package/src/tool.ts +342 -0
- package/src/types.ts +150 -0
- package/src/ui/bootstrap-text.ts +125 -0
- package/src/ui/bootstrap.ts +363 -0
- package/src/ui/command-text.ts +38 -0
- package/src/ui/format.ts +56 -0
- package/src/ui/index.ts +156 -0
- package/src/ui/mail-message.ts +263 -0
- package/src/ui/status.ts +213 -0
- package/src/ui/viewer-text.ts +309 -0
- package/src/ui/viewer.ts +1403 -0
- package/src/urls-text.ts +304 -0
- package/src/urls.ts +1488 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { createTranslator } from "@onlyne/node-host/i18n";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Every string the viewer draws. `en` is the canonical key set; the Chinese
|
|
5
|
+
* catalog is typed against it so a missing or extra key fails to compile.
|
|
6
|
+
* Lookups happen at paint time, so switching the process locale repaints the
|
|
7
|
+
* surface without rebuilding a module constant.
|
|
8
|
+
*/
|
|
9
|
+
const en = {
|
|
10
|
+
"region.undeclared": "no region declared",
|
|
11
|
+
"group.gateway": "resource nodes",
|
|
12
|
+
|
|
13
|
+
"trust.phase.exchanged": "verified",
|
|
14
|
+
"trust.phase.requested": "waiting for peer",
|
|
15
|
+
"trust.phase.invited": "waiting for you",
|
|
16
|
+
"trust.phase.revoked": "revoked",
|
|
17
|
+
"trust.short.exchanged": "verified",
|
|
18
|
+
"trust.short.requested": "peer pending",
|
|
19
|
+
"trust.short.invited": "you pending",
|
|
20
|
+
"trust.short.revoked": "revoked",
|
|
21
|
+
"trust.none": "no key",
|
|
22
|
+
|
|
23
|
+
"error.notConfigured": "Onlyne is not configured. Run /onlyne init to fill in the project settings.",
|
|
24
|
+
|
|
25
|
+
"send.blocked.empty": "Type a message first.",
|
|
26
|
+
"send.blocked.noTarget": "Open a thread first, or pick a recipient.",
|
|
27
|
+
"send.blocked.readOnly": "This thread is read-only here: its owner holds it, so send from a node that owns it.",
|
|
28
|
+
|
|
29
|
+
"rail.domain.title": "{label} · nodes {count}",
|
|
30
|
+
"rail.empty": "no domains",
|
|
31
|
+
|
|
32
|
+
"sidebar.pending": "waiting for you",
|
|
33
|
+
"sidebar.invite.title": "{node}\nclick to check the fingerprint",
|
|
34
|
+
"sidebar.threads": "threads",
|
|
35
|
+
"sidebar.thread.title": "{title} · messages {count} · {alias}",
|
|
36
|
+
"sidebar.empty": "no threads yet",
|
|
37
|
+
"sidebar.inbox": "✉ Inbox",
|
|
38
|
+
"sidebar.noKey": "no node key",
|
|
39
|
+
"thread.closed": "closed",
|
|
40
|
+
"thread.readOnly": "read-only",
|
|
41
|
+
|
|
42
|
+
"key.missing": "this node has no key",
|
|
43
|
+
"approvals.head": "{node} asks to exchange keys with you",
|
|
44
|
+
"field.peerFingerprint": "peer fingerprint",
|
|
45
|
+
"field.ownFingerprint": "local fingerprint",
|
|
46
|
+
"field.endpoint": "endpoint",
|
|
47
|
+
"action.accept": "Accept",
|
|
48
|
+
"approvals.accept.title": "Fingerprints match; approve this exchange",
|
|
49
|
+
"action.reject": "Reject",
|
|
50
|
+
"approvals.reject.title": "Do not approve this request",
|
|
51
|
+
"action.details": "Details",
|
|
52
|
+
"approvals.details.title": "Open this node in the member column",
|
|
53
|
+
|
|
54
|
+
"message.reply.title": "#{seq} · click to reply to this one",
|
|
55
|
+
|
|
56
|
+
"composer.reply": "Replying to {node} · {id}",
|
|
57
|
+
"composer.new": "New message to {node}",
|
|
58
|
+
"composer.thread": "Speaking in # {title} · hosted by {owner}",
|
|
59
|
+
"composer.cancelReply": "Cancel reply",
|
|
60
|
+
"composer.cancelReply.title": "Stop quoting this message",
|
|
61
|
+
"composer.back": "Back to thread",
|
|
62
|
+
"composer.back.title": "Clear the manual recipient",
|
|
63
|
+
"composer.send": "Send",
|
|
64
|
+
"composer.send.title": "Send this message",
|
|
65
|
+
"composer.sending": "Sending…",
|
|
66
|
+
|
|
67
|
+
"inbox.heading.inbound": "incoming",
|
|
68
|
+
"inbox.heading.outbound": "outgoing",
|
|
69
|
+
"inbox.heading.context": "local context",
|
|
70
|
+
"inbox.heading.decision": "decisions",
|
|
71
|
+
"inbox.empty": "The queue is empty.",
|
|
72
|
+
"inbox.title": "✉ Inbox",
|
|
73
|
+
"inbox.pending": "{count} waiting",
|
|
74
|
+
|
|
75
|
+
"action.reload": "Reload",
|
|
76
|
+
|
|
77
|
+
"exchange.head": "Exchange keys with {node}",
|
|
78
|
+
"field.peerNode": "peer node",
|
|
79
|
+
"action.confirmExchange": "Confirm and send request",
|
|
80
|
+
"action.cancel": "Cancel",
|
|
81
|
+
|
|
82
|
+
"flow.empty": "Open a thread on the left, or pick a node in the member column to start a conversation.",
|
|
83
|
+
"thread.meta": "messages {messages} · speakers {speakers} · hosted by {owner}{last}",
|
|
84
|
+
"thread.meta.last": " · latest {age}",
|
|
85
|
+
"thread.empty": "This thread has no messages yet.",
|
|
86
|
+
"time.unknown": "time unknown",
|
|
87
|
+
"loading": "Reading Onlyne state…",
|
|
88
|
+
|
|
89
|
+
"connect.head": "Connect a node",
|
|
90
|
+
"connect.hint":
|
|
91
|
+
"An origin (http://host:7801) or a service URL (http://host:7801/onlyne/v3) both work; a successful connection is saved as a seed and contacted on the next start.",
|
|
92
|
+
"connect.submit": "Connect",
|
|
93
|
+
"connect.connecting": "Connecting…",
|
|
94
|
+
"connect.submit.title": "Read this address and save it as a seed",
|
|
95
|
+
"connect.cancel.title": "Close the address field",
|
|
96
|
+
|
|
97
|
+
"members.head": "nodes in domain · {count}",
|
|
98
|
+
"members.add": "Add address",
|
|
99
|
+
"members.add.title": "Connect a node discovery cannot see",
|
|
100
|
+
"members.refresh": "Refresh",
|
|
101
|
+
"members.refresh.title": "Observe one more discovery round",
|
|
102
|
+
"members.empty": "No reachable nodes in this domain yet.",
|
|
103
|
+
|
|
104
|
+
"field.fingerprint": "fingerprint",
|
|
105
|
+
"field.domain": "domain",
|
|
106
|
+
"field.status": "status",
|
|
107
|
+
"field.source": "source",
|
|
108
|
+
"field.lastSeen": "last seen",
|
|
109
|
+
"member.fingerprint.none": "not exchanged",
|
|
110
|
+
"member.source.seed": "connected by address (saved as a seed)",
|
|
111
|
+
"member.lastSeen.stale": " · record expired",
|
|
112
|
+
"action.useTarget": "Use as recipient",
|
|
113
|
+
"member.target.title": "Send messages to this node",
|
|
114
|
+
"action.acceptExchange": "Accept exchange",
|
|
115
|
+
"action.requestExchange": "Request key exchange",
|
|
116
|
+
"member.request.title": "Read the peer fingerprint, check it, then send the request",
|
|
117
|
+
"action.revoke": "Revoke trust",
|
|
118
|
+
"verb.revoke": "Revoke",
|
|
119
|
+
"verb.reject": "Reject",
|
|
120
|
+
|
|
121
|
+
"notice.refreshing": "Refreshing discovery…",
|
|
122
|
+
"notice.refreshed": "Discovery refreshed.",
|
|
123
|
+
"notice.refreshFailed": "Refresh failed: {error}",
|
|
124
|
+
"notice.notRunning": "Onlyne is not running; run /onlyne init first.",
|
|
125
|
+
"notice.addressEmpty": "Fill in an address first, e.g. http://127.0.0.1:7801/onlyne/v3",
|
|
126
|
+
"notice.connected": "Connected to {seed} and saved it as a seed; the next start contacts it automatically.",
|
|
127
|
+
"notice.connectFailed": "Connection failed: {error}",
|
|
128
|
+
"notice.accepted": "Approved the key of {node}.",
|
|
129
|
+
"notice.acceptFailed": "Approval failed: {error}",
|
|
130
|
+
"notice.rejected": "Rejected this request from {node}; it comes back if the peer asks again.",
|
|
131
|
+
"notice.revoked": "Revoked trust in {node}.",
|
|
132
|
+
"notice.failed": "{verb} failed: {error}",
|
|
133
|
+
"notice.requestFailed": "Request failed: {error}",
|
|
134
|
+
"notice.exchangeSent": "Key exchange with {node} submitted; both sides' approval shows in the member column.",
|
|
135
|
+
"notice.sendFailed": "Send failed: {error}",
|
|
136
|
+
|
|
137
|
+
"outcome.refused": "Not delivered: {error}",
|
|
138
|
+
"outcome.refused.peer": "the peer refused",
|
|
139
|
+
"outcome.replied": "Delivered; the peer replied: {reply}",
|
|
140
|
+
"outcome.reply.empty": "(empty)",
|
|
141
|
+
"outcome.accepted": "Delivered.",
|
|
142
|
+
"outcome.unknown": "Delivery result unknown; retries continue within the window.",
|
|
143
|
+
|
|
144
|
+
"delivery.reply": "reply to {node}",
|
|
145
|
+
"delivery.to": "send {node} a message",
|
|
146
|
+
"delivery.thread": "send a message in {title}",
|
|
147
|
+
|
|
148
|
+
"fallback.status": "Onlyne · {region} · nodes {nodes} · neighbors {neighbors} · alerts {alerts} · unread {unread}",
|
|
149
|
+
"fallback.inbox": "Inbox · {count} waiting",
|
|
150
|
+
"fallback.threads": "threads {count} · {title}",
|
|
151
|
+
"fallback.none": "none selected",
|
|
152
|
+
"fallback.invite": "waiting for you · {node} · {fingerprint}",
|
|
153
|
+
"fallback.address": "connecting to {address} · Enter to connect",
|
|
154
|
+
"fallback.empty": "(empty)",
|
|
155
|
+
"fallback.draft": "draft: {text}{blocked}",
|
|
156
|
+
} as const;
|
|
157
|
+
|
|
158
|
+
export type ViewerTextKey = keyof typeof en;
|
|
159
|
+
|
|
160
|
+
const zh: Record<ViewerTextKey, string> = {
|
|
161
|
+
"region.undeclared": "未声明域",
|
|
162
|
+
"group.gateway": "资源节点",
|
|
163
|
+
|
|
164
|
+
"trust.phase.exchanged": "已认证",
|
|
165
|
+
"trust.phase.requested": "等对方确认",
|
|
166
|
+
"trust.phase.invited": "待你确认",
|
|
167
|
+
"trust.phase.revoked": "已撤销",
|
|
168
|
+
"trust.short.exchanged": "已认证",
|
|
169
|
+
"trust.short.requested": "等对方",
|
|
170
|
+
"trust.short.invited": "待确认",
|
|
171
|
+
"trust.short.revoked": "已撤销",
|
|
172
|
+
"trust.none": "无认证",
|
|
173
|
+
|
|
174
|
+
"error.notConfigured": "未配置 Onlyne。先运行 /onlyne init 填写项目配置。",
|
|
175
|
+
|
|
176
|
+
"send.blocked.empty": "输入内容后发送",
|
|
177
|
+
"send.blocked.noTarget": "先打开线程,或选择收件人",
|
|
178
|
+
"send.blocked.readOnly": "这个线程在此只读:它由所有者托管,请从拥有它的节点发送。",
|
|
179
|
+
|
|
180
|
+
"rail.domain.title": "{label} · {count} 节点",
|
|
181
|
+
"rail.empty": "无域",
|
|
182
|
+
|
|
183
|
+
"sidebar.pending": "待你确认",
|
|
184
|
+
"sidebar.invite.title": "{node}\n点击核对指纹",
|
|
185
|
+
"sidebar.threads": "线程",
|
|
186
|
+
"sidebar.thread.title": "{title} · {count} 条消息 · {alias}",
|
|
187
|
+
"sidebar.empty": "还没有线程",
|
|
188
|
+
"sidebar.inbox": "✉ 收件箱",
|
|
189
|
+
"sidebar.noKey": "无节点密钥",
|
|
190
|
+
"thread.closed": "已关闭",
|
|
191
|
+
"thread.readOnly": "只读",
|
|
192
|
+
|
|
193
|
+
"key.missing": "本节点没有密钥",
|
|
194
|
+
"approvals.head": "{node} 请求与你交换密钥",
|
|
195
|
+
"field.peerFingerprint": "对方指纹",
|
|
196
|
+
"field.ownFingerprint": "本机指纹",
|
|
197
|
+
"field.endpoint": "端点",
|
|
198
|
+
"action.accept": "同意",
|
|
199
|
+
"approvals.accept.title": "双方指纹一致,批准这次交换",
|
|
200
|
+
"action.reject": "拒绝",
|
|
201
|
+
"approvals.reject.title": "不批准这次申请",
|
|
202
|
+
"action.details": "查看详情",
|
|
203
|
+
"approvals.details.title": "在成员栏打开这位节点",
|
|
204
|
+
|
|
205
|
+
"message.reply.title": "#{seq} · 点击回复这一条",
|
|
206
|
+
|
|
207
|
+
"composer.reply": "回复 {node} · {id}",
|
|
208
|
+
"composer.new": "新消息发送到 {node}",
|
|
209
|
+
"composer.thread": "发言到 # {title} · {owner} 托管",
|
|
210
|
+
"composer.cancelReply": "取消回复",
|
|
211
|
+
"composer.cancelReply.title": "不再引用这一条",
|
|
212
|
+
"composer.back": "改回线程发言",
|
|
213
|
+
"composer.back.title": "清除手动指定的收件人",
|
|
214
|
+
"composer.send": "发送",
|
|
215
|
+
"composer.send.title": "发送这条消息",
|
|
216
|
+
"composer.sending": "发送中…",
|
|
217
|
+
|
|
218
|
+
"inbox.heading.inbound": "来信",
|
|
219
|
+
"inbox.heading.outbound": "出站",
|
|
220
|
+
"inbox.heading.context": "本地上下文",
|
|
221
|
+
"inbox.heading.decision": "判定",
|
|
222
|
+
"inbox.empty": "队列是空的。",
|
|
223
|
+
"inbox.title": "✉ 收件箱",
|
|
224
|
+
"inbox.pending": "{count} 条待处理",
|
|
225
|
+
|
|
226
|
+
"action.reload": "重新读取",
|
|
227
|
+
|
|
228
|
+
"exchange.head": "与 {node} 交换密钥",
|
|
229
|
+
"field.peerNode": "对方节点",
|
|
230
|
+
"action.confirmExchange": "确认并发送申请",
|
|
231
|
+
"action.cancel": "取消",
|
|
232
|
+
|
|
233
|
+
"flow.empty": "从左边打开一个线程,或在成员栏选一位节点发起对话。",
|
|
234
|
+
"thread.meta": "{messages} 条消息 · {speakers} 位发言者 · {owner} 托管{last}",
|
|
235
|
+
"thread.meta.last": " · 最近一条 {age}",
|
|
236
|
+
"thread.empty": "这个线程还没有消息。",
|
|
237
|
+
"time.unknown": "时间未知",
|
|
238
|
+
"loading": "读取 Onlyne 状态…",
|
|
239
|
+
|
|
240
|
+
"connect.head": "连接一个节点",
|
|
241
|
+
"connect.hint":
|
|
242
|
+
"origin(http://host:7801)或服务地址(http://host:7801/onlyne/v3)都可以;连上后保存为种子,下次启动自动联系。",
|
|
243
|
+
"connect.submit": "连接",
|
|
244
|
+
"connect.connecting": "连接中…",
|
|
245
|
+
"connect.submit.title": "读取这个地址并保存为种子",
|
|
246
|
+
"connect.cancel.title": "关掉地址输入",
|
|
247
|
+
|
|
248
|
+
"members.head": "域内节点 · {count}",
|
|
249
|
+
"members.add": "添加地址",
|
|
250
|
+
"members.add.title": "按地址连接一个发现不到的节点",
|
|
251
|
+
"members.refresh": "刷新",
|
|
252
|
+
"members.refresh.title": "重新观察一轮发现",
|
|
253
|
+
"members.empty": "这个域还没有可达节点。",
|
|
254
|
+
|
|
255
|
+
"field.fingerprint": "指纹",
|
|
256
|
+
"field.domain": "域",
|
|
257
|
+
"field.status": "状态",
|
|
258
|
+
"field.source": "来源",
|
|
259
|
+
"field.lastSeen": "最后可见",
|
|
260
|
+
"member.fingerprint.none": "未交换",
|
|
261
|
+
"member.source.seed": "按地址连接(已存为种子)",
|
|
262
|
+
"member.lastSeen.stale": " · 记录已过期",
|
|
263
|
+
"action.useTarget": "用作发送目标",
|
|
264
|
+
"member.target.title": "把消息发给这位节点",
|
|
265
|
+
"action.acceptExchange": "同意交换",
|
|
266
|
+
"action.requestExchange": "请求交换密钥",
|
|
267
|
+
"member.request.title": "读取对方指纹,核对后发送申请",
|
|
268
|
+
"action.revoke": "撤销信任",
|
|
269
|
+
"verb.revoke": "撤销",
|
|
270
|
+
"verb.reject": "拒绝",
|
|
271
|
+
|
|
272
|
+
"notice.refreshing": "正在刷新发现…",
|
|
273
|
+
"notice.refreshed": "发现已刷新。",
|
|
274
|
+
"notice.refreshFailed": "刷新失败:{error}",
|
|
275
|
+
"notice.notRunning": "Onlyne 还没启动,先运行 /onlyne init。",
|
|
276
|
+
"notice.addressEmpty": "先填写地址,例如 http://127.0.0.1:7801/onlyne/v3",
|
|
277
|
+
"notice.connected": "已连接 {seed},并保存为种子;下次启动会自动联系。",
|
|
278
|
+
"notice.connectFailed": "连接失败:{error}",
|
|
279
|
+
"notice.accepted": "已批准 {node} 的密钥。",
|
|
280
|
+
"notice.acceptFailed": "批准失败:{error}",
|
|
281
|
+
"notice.rejected": "已拒绝 {node} 的这次申请;对方再次申请时会重新出现。",
|
|
282
|
+
"notice.revoked": "已撤销 {node} 的信任。",
|
|
283
|
+
"notice.failed": "{verb}失败:{error}",
|
|
284
|
+
"notice.requestFailed": "请求失败:{error}",
|
|
285
|
+
"notice.exchangeSent": "已提交与 {node} 的密钥交换,双方批准状态见成员栏。",
|
|
286
|
+
"notice.sendFailed": "发送失败:{error}",
|
|
287
|
+
|
|
288
|
+
"outcome.refused": "未送达:{error}",
|
|
289
|
+
"outcome.refused.peer": "对方拒绝",
|
|
290
|
+
"outcome.replied": "已送达,对方回了:{reply}",
|
|
291
|
+
"outcome.reply.empty": "(空)",
|
|
292
|
+
"outcome.accepted": "已送达。",
|
|
293
|
+
"outcome.unknown": "投递结果未知,会在重试窗口内继续。",
|
|
294
|
+
|
|
295
|
+
"delivery.reply": "回复 {node}",
|
|
296
|
+
"delivery.to": "给 {node} 发一条消息",
|
|
297
|
+
"delivery.thread": "在 {title} 里发一条消息",
|
|
298
|
+
|
|
299
|
+
"fallback.status": "Onlyne · {region} · 节点 {nodes} · 邻居 {neighbors} · 告警 {alerts} · 未读 {unread}",
|
|
300
|
+
"fallback.inbox": "收件箱 · {count} 条待处理",
|
|
301
|
+
"fallback.threads": "线程 {count} · {title}",
|
|
302
|
+
"fallback.none": "未选择",
|
|
303
|
+
"fallback.invite": "待确认 · {node} · {fingerprint}",
|
|
304
|
+
"fallback.address": "连接地址:{address} · Enter 连接",
|
|
305
|
+
"fallback.empty": "(空)",
|
|
306
|
+
"fallback.draft": "传入:{text}{blocked}",
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export const t = createTranslator({ en, "zh-CN": zh });
|