Repository navigation
Expand file tree
/
Copy pathLoc.Connection.cs
More file actions
110 lines (106 loc) · 8.3 KB
/
Copy pathLoc.Connection.cs
File metadata and controls
110 lines (106 loc) · 8.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
namespace VelaShell.Plugin.Mongo;
public sealed partial class Loc
{
/// <summary>
/// 插件自己管的连接:对象树根上的连接行与右键菜单、新建 / 编辑连接对话框(设计稿 10)、
/// 连接中 / 连接失败的占位卡片(设计稿 22),以及对话框右侧栏的连接检查(连接串预览、逐步测试、发现的成员)。
/// </summary>
private static readonly (string Key, string En, string Zh)[] ConnectionTexts =
[
// ── 工具栏 / 对象树 / 空状态 ──
("Toolbar_Connect", "Connect", "连接"),
("Conn_New", "New connection", "新建连接"),
("Conn_NewTip", "New MongoDB connection — saved connections are listed at the root of the object tree", "新建 MongoDB 连接 —— 已保存的连接列在对象树的根上"),
("Conn_Connect", "Connect", "连接"),
("Conn_Disconnect", "Disconnect", "断开连接"),
("Conn_Edit", "Edit connection", "编辑连接"),
("Conn_Duplicate", "Duplicate connection", "复制连接"),
("Conn_Delete", "Delete connection", "删除连接"),
("Conn_CopyName", "{0}-copy", "{0}-副本"),
("Conn_DeleteTitle", "Delete connection", "删除连接"),
("Conn_DeleteBody", "Delete the saved connection “{0}” and its stored password? Nothing on the server is touched.",
"删除已保存的连接「{0}」及存着的口令?服务器上的数据不受影响。"),
("Conn_DeleteConfirm", "Delete", "删除"),
("Conn_StateOffline", "Not connected", "未连接"),
("Conn_StateFailed", "Connection failed", "连接失败"),
("Conn_NoneYet", "No connections yet — create one with Connect in the toolbar", "还没有连接 —— 先用工具栏的「连接」新建一条"),
("Conn_PickFirst", "Connect to a server first — double-click it in the object tree", "先连上一条连接 —— 在左侧对象树里双击它"),
("Conn_EmptyTitle", "No MongoDB connections yet", "还没有 MongoDB 连接"),
("Conn_EmptyBody", "Connections are kept by this plugin; passwords go to VelaShell's encrypted key store.",
"连接由本插件保存,口令进 VelaShell 的加密密钥库。"),
("Conn_PickTitle", "Nothing open", "还没有打开任何对象"),
("Conn_PickHint", "Double-click a connection on the left to open it", "在左侧双击一条连接打开它"),
("Conn_LoadFailed", "Couldn't read the saved connections: {0}", "读取已保存的连接失败:{0}"),
("Conn_SavedReconnectHint", "Saved. Reconnect for the changes to take effect.", "已保存。重新连接后生效。"),
// ── 连接中 / 连接失败(设计稿 22)──
("Conn_Connecting", "Connecting to {0}", "正在连接 {0}"),
("Conn_ViaJump", "via SSH jump host {0}", "经 SSH 跳板 {0}"),
("Conn_FailedTitle", "Can't connect to {0}", "无法连接 {0}"),
("Conn_CloseTab", "Close tab", "关闭标签页"),
("Conn_Reconnect", "Reconnect", "重新连接"),
("Conn_CertTitle", "The server presented this certificate:", "服务器出示的证书:"),
("Conn_CertLine", "{0} · issued by {1} · expires {2:yyyy-MM-dd} · SHA-1 {3}", "{0} · 签发者 {1} · 到期 {2:yyyy-MM-dd} · SHA-1 {3}"),
("Conn_TrustReconnect", "Trust this certificate and reconnect", "信任此证书并重连"),
("Conn_TunnelFailed", "The SSH jump host could not be set up: {0}", "SSH 跳板没建起来:{0}"),
("Conn_SshReason", "MongoDB connection “{0}” forwards through this host to {1}", "MongoDB 连接「{0}」要经这台机器转发到 {1}"),
// ── 新建 / 编辑连接(设计稿 10)──
("Conn_NewTitle", "New MongoDB connection", "新建 MongoDB 连接"),
("Conn_EditTitle", "Edit MongoDB connection", "编辑 MongoDB 连接"),
("Conn_SecBasic", "Basic", "基本"),
("Conn_SecAuth", "Authentication", "认证"),
("Conn_SecAdvanced", "Advanced", "高级"),
("Conn_Name", "Connection name", "连接名"),
("Conn_Group", "Group", "分组"),
("Conn_GroupNone", "No group", "不分组"),
("Conn_AddHost", "Add host", "添加主机"),
("Conn_RemoveHost", "Remove this host", "移除这台主机"),
("Conn_UserAnonymous", "Empty = anonymous", "留空 = 匿名"),
("Conn_PasswordStored", "Saved — leave empty to keep it", "已保存 —— 留空表示不改"),
("Conn_Keychain", "Key store", "钥匙串"),
("Conn_KeychainTip", "Kept in VelaShell's encrypted key store — never in the connection string or this plugin's settings",
"存在 VelaShell 的加密密钥库里 —— 不写进连接字符串,也不写进本插件的设置"),
("Conn_AuthPlain", "PLAIN (LDAP)", "PLAIN(LDAP)"),
("Conn_EjsonShell", "mongosh syntax", "mongosh 写法"),
("Conn_SshNone", "No saved SSH connections yet — save one in VelaShell first, then pick it here as the jump host.",
"还没有保存的 SSH 连接 —— 先在 VelaShell 里存一条,再回来选它做跳板。"),
("Conn_SshNoSrv", "An SRV record resolves to several members through DNS; one forwarded port can only reach one of them.",
"SRV 记录经 DNS 解析出一组成员,一条转发只通得到其中一台。"),
("Conn_SshMissing", "(SSH connection no longer exists)", "(这条 SSH 连接已不存在)"),
("Conn_CopyUri", "Copy connection string", "复制连接字符串"),
("Conn_TestResults", "Test results", "测试结果"),
("Conn_TestResultsHint", "Click Test connection to check this connection step by step.", "点「测试连接」逐步检查这条连接。"),
("Conn_Test", "Test connection", "测试连接"),
("Conn_SaveOnly", "Save only", "仅保存"),
("Conn_SaveConnect", "Save and connect", "保存并连接"),
("Conn_NeedName", "Give the connection a name", "给连接起个名字"),
("Conn_DuplicateName", "A connection named “{0}” already exists", "已经有一条叫「{0}」的连接了"),
("Conn_NeedHost", "Fill in the host", "填一下主机"),
("Conn_NeedUri", "Fill in the connection string", "填一下连接字符串"),
("Conn_SaveFailed", "Couldn't save the connection: {0}", "保存连接失败:{0}"),
// ── 右侧栏的连接检查(ConnectionProbe:连接串预览、逐步测试、发现的成员)──
("Conn_Uri", "Connection string", "连接字符串"),
("Conn_UriNote", "The password never goes into the connection string; only VelaShell's encrypted key store keeps it.",
"密码不会写入连接字符串,仅保存在 VelaShell 的加密密钥库里。"),
("Conn_Members", "Discovered members", "发现的成员"),
("Conn_TestOk", "Connected · {0} ms", "连接成功 · {0} ms"),
("Conn_TestFailed", "{0} failed", "{0}失败"),
("Conn_Skipped", "Not run", "未执行"),
("Conn_StepSsh", "SSH tunnel", "SSH 隧道"),
("Conn_StepTcp", "TCP connection", "TCP 连接"),
("Conn_TcpSrv", "Members come from the SRV record; the driver resolves them", "成员来自 SRV 记录,由驱动解析"),
("Conn_TcpViaTunnel", "{0} reachable from the jump host · {1} ms", "跳板上可达 {0} · {1} ms"),
("Conn_StepAuth", "{0} authentication", "{0} 认证"),
("Conn_StepAuthNone", "Authentication", "认证"),
("Conn_StepPrivileges", "Privilege check", "权限检查"),
("Conn_SshDetail", "{0} · local port {1} · {2} ms", "{0} · 本地端口 {1} · {2} ms"),
("Conn_TcpDetail", "{0} / {1} members reachable · {2} ms", "{0} / {1} 个成员可达 · {2} ms"),
("Conn_Anonymous", "Not authenticated (authentication is off)", "未认证(服务器未开启认证)"),
("Conn_PrivUnrestricted", "Authentication off · writes are not restricted", "未开启认证 · 写入不受限"),
("Conn_PrivReadOnly", "Only {0} · write features will be greyed out", "只有 {0} · 写入功能将置灰"),
("Conn_PrivWritable", "{0} · writable: {1}", "{0} · 可写:{1}"),
("Conn_PrivAllDatabases", "all databases", "全部库"),
("Conn_ListSeparator", ", ", "、"),
("Conn_Ping", "ping {0}", "延迟 {0}"),
("Conn_ReplLag", "lag {0}", "复制延迟 {0}")
];
}