Repository navigation
Expand file tree
/
Copy pathLoc.Core.cs
More file actions
134 lines (129 loc) · 8.36 KB
/
Copy pathLoc.Core.cs
File metadata and controls
134 lines (129 loc) · 8.36 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
namespace VelaShell.Plugin.Mongo;
public sealed partial class Loc
{
/// <summary>连接表单、连接失败、BSON 类型名与全插件通用的词。</summary>
private static readonly (string Key, string En, string Zh)[] CoreTexts =
[
// ── 连接表单(宿主按声明渲染)──
("Mongo_Host", "Host", "主机"),
("Mongo_HostSrv", "SRV domain", "SRV 域名"),
("Mongo_HostUri", "Connection string URI", "连接字符串 URI"),
("Mongo_User", "Username", "用户名"),
("Mongo_Password", "Password", "密码"),
("Mongo_Topology", "Servers", "服务器"),
("Mongo_TopologyHosts", "Host list", "主机列表"),
("Mongo_TopologySrv", "SRV record", "SRV 记录"),
("Mongo_TopologyUri", "Connection string URI", "连接字符串 URI"),
("Mongo_Hosts", "Other members", "其余成员"),
("Mongo_HostsHint", "Members are discovered when you test the connection.",
"测试连接后自动发现成员"),
("Mongo_ReplicaSet", "Replica set name", "副本集名称"),
("Mongo_DirectConnection", "Direct connection (no discovery)", "直连(不做副本集发现)"),
("Mongo_DirectConnectionHint", "Turned on automatically through an SSH tunnel: the other members' addresses are not reachable through it.",
"经 SSH 隧道时自动开启:隧道只通到这一台,其余成员的地址从本机够不着。"),
("Mongo_Database", "Default database", "默认数据库"),
("Mongo_ReadPreference", "Read preference", "读偏好 readPreference"),
("Mongo_AuthMechanism", "Mechanism", "认证机制"),
("Mongo_AuthDefault", "Default (negotiate SCRAM-SHA-256)", "默认(协商 SCRAM-SHA-256)"),
("Mongo_AuthSource", "authSource", "authSource"),
("Mongo_Tls", "TLS", "TLS"),
("Mongo_TlsCaFile", "CA certificate (PEM)", "CA 证书(PEM)"),
("Mongo_TlsCertFile", "Client certificate (PFX / PEM)", "客户端证书(PFX / PEM)"),
("Mongo_TlsHint", "Required for Atlas and X.509 auth; once on, pick a CA and a client certificate.",
"Atlas 与 X.509 认证必开;启用后可指定 CA 与客户端证书。"),
("Mongo_Environment", "Environment", "环境标记"),
("Mongo_EnvDevelopment", "Development", "开发"),
("Mongo_EnvTesting", "Testing", "测试"),
("Mongo_EnvProduction", "Production", "生产"),
("Mongo_SecChannel", "Secure channel", "安全通道"),
("Mongo_SecPolicy", "Security policy", "安全策略"),
("Mongo_ReadOnly", "Open in read-only mode", "默认以只读模式打开"),
("Mongo_ReadOnlyHint", "Recommended for production; unlock writes from the toolbar's Read/Write switch.",
"生产环境推荐;写操作需在工具栏手动解锁"),
("Mongo_ConfirmWrites", "Confirm before writing", "写操作前二次确认"),
("Mongo_ConfirmWritesHint", "Deletes, bulk updates and dropCollection ask for the name to be typed.",
"删除、批量更新、dropCollection 需输入名称确认"),
("Mongo_DisableDropDatabase", "Disable dropDatabase", "禁用 dropDatabase"),
("Mongo_DisableDropDatabaseHint", "Never offered in menus, even when the user has the privilege.",
"即使拥有权限也不在菜单中出现"),
("Mongo_AppName", "Application name", "应用名 appName"),
("Mongo_AppNameHint", "Shows up in currentOp and the server log so a DBA can tell who is connected.",
"会出现在 currentOp 与服务器日志里,DBA 据此认出是谁连着。"),
("Mongo_ConnectTimeout", "Connect timeout (ms)", "连接超时(毫秒)"),
("Mongo_MaxTimeMs", "Default maxTimeMS", "默认 maxTimeMS"),
("Mongo_PageSize", "Rows per page", "每页行数"),
("Mongo_SampleSize", "Schema sample size", "Schema 抽样数"),
("Mongo_EjsonMode", "Extended JSON mode", "扩展 JSON 模式"),
("Mongo_ShowSystemDatabases", "Show system databases", "显示系统库"),
("Mongo_ShowSystemDatabasesHint", "List admin, config and local in the object tree. The eye button above the tree toggles it for this session.",
"在对象树里列出 admin、config、local;对象树表头的眼睛按钮可在本次会话里临时切换。"),
("Mongo_JumpSession", "SSH jump host", "SSH 跳板"),
("Mongo_JumpSessionHint", "Forwarded through a saved SSH session — no extra credentials.",
"经已保存的 SSH 会话转发,无需额外凭据"),
// ── 连接失败(翻成 SDK 异常时的文案)──
("Mongo_AuthFailed", "Authentication failed: {0}", "认证失败:{0}"),
("Mongo_ConnectFailed", "Could not reach {0}: {1}", "无法连接 {0}:{1}"),
("Mongo_Unsupported", "Not supported: {0}", "不支持:{0}"),
("Mongo_BadUri", "Not a valid MongoDB connection string: {0}", "不是合法的 MongoDB 连接字符串:{0}"),
("Mongo_Connected", "Connected", "已连接"),
("Mongo_Disconnected", "Disconnected", "已断开"),
("Mongo_Error", "Error: {0}", "出错:{0}"),
// ── BSON 类型名(网格列头、类型下拉、补全)──
("Bson_ObjectId", "ObjectId", "ObjectId"),
("Bson_String", "String", "String"),
("Bson_Int32", "Int32", "Int32"),
("Bson_Int64", "Int64", "Int64"),
("Bson_Double", "Double", "Double"),
("Bson_Decimal128", "Decimal128", "Decimal128"),
("Bson_Boolean", "Boolean", "Boolean"),
("Bson_Date", "Date", "Date"),
("Bson_Object", "Object", "Object"),
("Bson_Array", "Array", "Array"),
("Bson_Null", "Null", "Null"),
("Bson_Binary", "Binary", "Binary"),
("Bson_BinaryUuid", "Binary · UUID", "Binary · UUID"),
("Bson_Regex", "Regex", "Regex"),
("Bson_Timestamp", "Timestamp", "Timestamp"),
("Bson_Missing", "Missing field", "缺失字段"),
("Bson_FieldsSummary", "{{ {0} fields }}", "{{ {0} 个字段 }}"),
("Bson_ItemsSummary", "[ {0} items ]", "[ {0} 项 ]"),
// ── 类型化编辑的失败原因 ──
("Edit_NotInt32", "Not a 32-bit integer", "不是 32 位整数"),
("Edit_NotInt64", "Not a 64-bit integer", "不是 64 位整数"),
("Edit_NotNumber", "Not a number", "不是数字"),
("Edit_NotBoolean", "Use true or false", "请填 true 或 false"),
("Edit_NotDate", "Use yyyy-MM-dd HH:mm:ss or ISO 8601", "请用 yyyy-MM-dd HH:mm:ss 或 ISO 8601"),
("Edit_NotObjectId", "Not a 24-digit hex ObjectId", "不是 24 位十六进制 ObjectId"),
("Edit_NotUuid", "Not a UUID", "不是 UUID"),
("Edit_NotObject", "Not a document { … }", "不是文档 { … }"),
("Edit_NotArray", "Not an array [ … ]", "不是数组 [ … ]"),
("Edit_BadLiteral", "Not a valid literal", "不是合法的字面量"),
("Edit_ValueReset", "The value could not be converted and was reset", "值无法换算,已重置"),
("Shell_DottedKey", "Dotted field names need quotes → \"{0}\"", "含点号的字段名需加引号 → \"{0}\""),
// ── 通用 ──
("Common_Cancel", "Cancel", "取消"),
("Common_Close", "Close", "关闭"),
("Common_Save", "Save", "保存"),
("Common_Apply", "Apply", "应用"),
("Common_Discard", "Discard", "放弃"),
("Common_Delete", "Delete", "删除"),
("Common_Refresh", "Refresh", "刷新"),
("Common_Copy", "Copy", "复制"),
("Common_Next", "Next", "下一步"),
("Common_Back", "Back", "上一步"),
("Common_Run", "Run", "运行"),
("Common_Stop", "Stop", "停止"),
("Common_Yes", "Yes", "是"),
("Common_No", "No", "否"),
("Common_All", "All", "全部"),
("Common_None", "—", "—"),
("Common_Loading", "Loading…", "加载中…"),
("Common_Ms", "{0} ms", "{0} ms"),
("Common_Docs", "{0} documents", "{0} 份文档"),
("Common_ReadOnlyBlocked", "Read-only mode — unlock writes from the toolbar's Read/Write switch.",
"当前为只读模式 · 点击工具栏「读写」开关解锁"),
("Common_NoPrivilege", "Your user has no write privilege here.", "当前用户在这里没有写权限。"),
("Common_Failed", "Failed: {0}", "失败:{0}"),
("Common_Copied", "Copied", "已复制"),
];
}