forked from Jack251970/ContextMenuManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppString.cs
More file actions
391 lines (378 loc) · 20 KB
/
AppString.cs
File metadata and controls
391 lines (378 loc) · 20 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
using ContextMenuManager.Properties;
using System.Text;
namespace ContextMenuManager.Methods
{
internal static class AppString
{
private static IniReader _userLangReader;
private static IniReader UserLangReader
{
get
{
// 延迟初始化,确保AppConfig.LanguageIniPath已经被正确设置
_userLangReader ??= new IniReader(AppConfig.LanguageIniPath);
return _userLangReader;
}
}
public static readonly IniReader DefLangReader = new(new StringBuilder(AppResources.AppLanguageDic));
private static string GetValue(string section, string key)
{
var value = UserLangReader.GetValue(section, key);
if (string.IsNullOrEmpty(value)) value = DefLangReader.GetValue(section, key);
return value.Replace("\\r", "\r").Replace("\\n", "\n");
}
/// <summary>加载语言</summary>
public static void LoadStrings()
{
// 重置UserLangReader,确保使用最新的LanguageIniPath
_userLangReader = new IniReader(AppConfig.LanguageIniPath);
foreach (var type in typeof(AppString).GetNestedTypes())
{
foreach (var pi in type.GetProperties())
{
pi.SetValue(type, GetValue(type.Name, pi.Name), null);
}
}
}
/// <summary>常规</summary>
public static class General
{
public static string AppName { get; set; }
}
/// <summary>工具栏</summary>
public static class ToolBar
{
public static string Home { get; set; }
public static string Type { get; set; }
public static string Rule { get; set; }
public static string Refresh { get; set; }
public static string About { get; set; }
}
/// <summary>侧边栏</summary>
public static class SideBar
{
public static string File { get; set; }
public static string Folder { get; set; }
public static string Directory { get; set; }
public static string Background { get; set; }
public static string Desktop { get; set; }
public static string Drive { get; set; }
public static string AllObjects { get; set; }
public static string Computer { get; set; }
public static string RecycleBin { get; set; }
public static string Library { get; set; }
public static string New { get; set; }
public static string SendTo { get; set; }
public static string OpenWith { get; set; }
public static string WinX { get; set; }
public static string LnkFile { get; set; }
public static string UwpLnk { get; set; }
public static string ExeFile { get; set; }
public static string UnknownType { get; set; }
public static string MenuAnalysis { get; set; }
public static string CustomExtension { get; set; }
public static string PerceivedType { get; set; }
public static string DirectoryType { get; set; }
public static string EnhanceMenu { get; set; }
public static string DetailedEdit { get; set; }
public static string GuidBlocked { get; set; }
public static string DragDrop { get; set; }
public static string PublicReferences { get; set; }
public static string CustomRegPath { get; set; }
public static string IEMenu { get; set; }
public static string AppSetting { get; set; }
public static string AboutApp { get; set; }
public static string Dictionaries { get; set; }
public static string AppLanguage { get; set; }
public static string Donate { get; set; }
public static string BackupRestore { get; set; }
}
/// <summary>状态栏</summary>
public static class StatusBar
{
public static string File { get; set; }
public static string Folder { get; set; }
public static string Directory { get; set; }
public static string Background { get; set; }
public static string Desktop { get; set; }
public static string Drive { get; set; }
public static string AllObjects { get; set; }
public static string Computer { get; set; }
public static string RecycleBin { get; set; }
public static string Library { get; set; }
public static string New { get; set; }
public static string SendTo { get; set; }
public static string OpenWith { get; set; }
public static string WinX { get; set; }
public static string LnkFile { get; set; }
public static string UwpLnk { get; set; }
public static string ExeFile { get; set; }
public static string UnknownType { get; set; }
public static string MenuAnalysis { get; set; }
public static string CustomExtension { get; set; }
public static string PerceivedType { get; set; }
public static string DirectoryType { get; set; }
public static string EnhanceMenu { get; set; }
public static string DetailedEdit { get; set; }
public static string GuidBlocked { get; set; }
public static string DragDrop { get; set; }
public static string PublicReferences { get; set; }
public static string CustomRegPath { get; set; }
public static string IEMenu { get; set; }
}
/// <summary>程序内右键菜单</summary>
public static class Menu
{
public static string ChangeText { get; set; }
public static string ItemIcon { get; set; }
public static string ChangeIcon { get; set; }
public static string AddIcon { get; set; }
public static string DeleteIcon { get; set; }
public static string ShieldIcon { get; set; }
public static string ItemPosition { get; set; }
public static string SetDefault { get; set; }
public static string SetTop { get; set; }
public static string SetBottom { get; set; }
public static string OtherAttributes { get; set; }
public static string OnlyWithShift { get; set; }
public static string OnlyInExplorer { get; set; }
public static string NoWorkingDirectory { get; set; }
public static string NeverDefault { get; set; }
public static string ShowAsDisabledIfHidden { get; set; }
public static string Details { get; set; }
public static string WebSearch { get; set; }
public static string ChangeCommand { get; set; }
public static string RunAsAdministrator { get; set; }
public static string FileProperties { get; set; }
public static string FileLocation { get; set; }
public static string RegistryLocation { get; set; }
public static string ExportRegistry { get; set; }
public static string Delete { get; set; }
public static string DeleteReference { get; set; }
public static string HandleGuid { get; set; }
public static string CopyGuid { get; set; }
public static string BlockGuid { get; set; }
public static string AddGuidDic { get; set; }
public static string ClsidLocation { get; set; }
public static string InitialData { get; set; }
public static string BeforeSeparator { get; set; }
public static string ChangeGroup { get; set; }
public static string RestoreDefault { get; set; }
public static string Edit { get; set; }
public static string Save { get; set; }
public static string FoldAll { get; set; }
public static string UnfoldAll { get; set; }
public static string RestoreBackup { get; set; }
public static string DeleteBackup { get; set; }
public static string SwitchUserContextMenuStyle { get; set; }
public static string Win11DefaultContextMenuStyle { get; set; }
public static string Win10ClassicContextMenuStyle { get; set; }
}
/// <summary>对话框子窗口</summary>
public static class Dialog
{
public static string OK { get; set; }
public static string Cancel { get; set; }
public static string Browse { get; set; }
public static string Program { get; set; }
public static string AllFiles { get; set; }
public static string RegistryFile { get; set; }
public static string ItemText { get; set; }
public static string ItemCommand { get; set; }
public static string CommandArguments { get; set; }
public static string SingleMenu { get; set; }
public static string MultiMenu { get; set; }
public static string Public { get; set; }
public static string Private { get; set; }
public static string SelectAll { get; set; }
public static string InputGuid { get; set; }
public static string AddGuidDic { get; set; }
public static string DeleteGuidDic { get; set; }
public static string NoPerceivedType { get; set; }
public static string TextFile { get; set; }
public static string DocumentFile { get; set; }
public static string ImageFile { get; set; }
public static string VideoFile { get; set; }
public static string AudioFile { get; set; }
public static string CompressedFile { get; set; }
public static string SystemFile { get; set; }
public static string DocumentDirectory { get; set; }
public static string ImageDirectory { get; set; }
public static string VideoDirectory { get; set; }
public static string AudioDirectory { get; set; }
public static string EditSubItems { get; set; }
public static string DetailedEdit { get; set; }
public static string CheckReference { get; set; }
public static string CheckCopy { get; set; }
public static string SelectExtension { get; set; }
public static string SelectPerceivedType { get; set; }
public static string SelectDirectoryType { get; set; }
public static string SelectNewItemType { get; set; }
public static string SelectGroup { get; set; }
public static string SelectObjectType { get; set; }
public static string SelectDropEffect { get; set; }
public static string DefaultDropEffect { get; set; }
public static string CopyDropEffect { get; set; }
public static string MoveDropEffect { get; set; }
public static string CreateLinkDropEffect { get; set; }
public static string Search { get; set; }
public static string DownloadLanguages { get; set; }
public static string TranslateTool { get; set; }
public static string DefaultText { get; set; }
public static string OldTranslation { get; set; }
public static string NewTranslation { get; set; }
public static string DonateInfo { get; set; }
public static string NewBackupItem { get; set; }
public static string BackupContent { get; set; }
public static string BackupMode { get; set; }
public static string RestoreBackupItem { get; set; }
public static string RestoreContent { get; set; }
public static string RestoreMode { get; set; }
public static string BackupMode1 { get; set; }
public static string BackupMode2 { get; set; }
public static string BackupMode3 { get; set; }
public static string RestoreMode1 { get; set; }
public static string RestoreMode2 { get; set; }
public static string RestoreMode3 { get; set; }
public static string RestoreDetails { get; set; }
public static string ItemLocation { get; set; }
public static string RestoredValue { get; set; }
public static string Enabled { get; set; }
public static string Disabled { get; set; }
}
/// <summary>消息</summary>
public static class Message
{
public static string TextCannotBeEmpty { get; set; }
public static string CommandCannotBeEmpty { get; set; }
public static string StringParsingFailed { get; set; }
public static string TextLengthCannotExceed80 { get; set; }
public static string ConfirmDeletePermanently { get; set; }
public static string DeleteButCanRestore { get; set; }
public static string ConfirmDeleteReference { get; set; }
public static string ConfirmDelete { get; set; }
public static string ConfirmDeleteReferenced { get; set; }
public static string CannotAddNewItem { get; set; }
public static string VistaUnsupportedMulti { get; set; }
public static string CannotHideSubItem { get; set; }
public static string UnsupportedFilename { get; set; }
public static string NoOpenModeExtension { get; set; }
public static string CannotChangePath { get; set; }
public static string CopiedToClipboard { get; set; }
public static string MalformedGuid { get; set; }
public static string HasBeenAdded { get; set; }
public static string EditInitialData { get; set; }
public static string PromptIsOpenItem { get; set; }
public static string SelectRegPath { get; set; }
public static string RestartApp { get; set; }
public static string UpdateInfo { get; set; }
public static string UpdateSucceeded { get; set; }
public static string DicUpdateSucceeded { get; set; }
public static string FileNotExists { get; set; }
public static string FolderNotExists { get; set; }
public static string VersionIsLatest { get; set; }
public static string AuthorityProtection { get; set; }
public static string WinXSorted { get; set; }
public static string RestoreDefault { get; set; }
public static string DeleteGroup { get; set; }
public static string WebDataReadFailed { get; set; }
public static string OpenWebUrl { get; set; }
public static string SelectSubMenuMode { get; set; }
public static string OldBackupVersion { get; set; }
public static string BackupSucceeded { get; set; }
public static string NoNeedRestore { get; set; }
public static string RestoreSucceeded { get; set; }
public static string ConfirmDeleteBackupPermanently { get; set; }
public static string DeprecatedBackupVersion { get; set; }
public static string NotChooseAnyBackup { get; set; }
public static string NotChooseAnyRestore { get; set; }
}
/// <summary>提示文本</summary>
public static class Tip
{
public static string RestartExplorer { get; set; }
public static string CustomFolder { get; set; }
public static string SendToDrive { get; set; }
public static string BuildSendtoMenu { get; set; }
public static string EditSubItems { get; set; }
public static string InvalidItem { get; set; }
public static string AddSeparator { get; set; }
public static string AddReference { get; set; }
public static string AddFromPublic { get; set; }
public static string AddFromParentMenu { get; set; }
public static string DeleteGuidDic { get; set; }
public static string LockNewMenu { get; set; }
public static string ConfigPath { get; set; }
public static string CommandFiles { get; set; }
public static string CreateGroup { get; set; }
public static string DropOrSelectObject { get; set; }
public static string ImmediatelyCheck { get; set; }
}
/// <summary>关于页面</summary>
public static class About
{
public static string Description { get; set; }
public static string CheckUpdate { get; set; }
public static string GitHub { get; set; }
public static string Gitee { get; set; }
public static string License { get; set; }
}
/// <summary>其他文本</summary>
public static class Other
{
public static string CustomFolder { get; set; }
public static string BuildSendtoMenu { get; set; }
public static string NewItem { get; set; }
public static string AddGuidBlockedItem { get; set; }
public static string CurrentExtension { get; set; }
public static string CurrentPerceivedType { get; set; }
public static string CurrentDirectoryType { get; set; }
public static string CurrentFilePath { get; set; }
public static string CurrentRegPath { get; set; }
public static string SelectRegPath { get; set; }
public static string InvalidItem { get; set; }
public static string Separator { get; set; }
public static string LockNewMenu { get; set; }
public static string RestartExplorer { get; set; }
public static string WebDictionaries { get; set; }
public static string SwitchDictionaries { get; set; }
public static string UserDictionaries { get; set; }
public static string DictionaryDescription { get; set; }
public static string GuidInfosDictionary { get; set; }
public static string UwpMode { get; set; }
public static string Translators { get; set; }
public static string AboutApp { get; set; }
public static string Dictionaries { get; set; }
public static string Donate { get; set; }
public static string DonationList { get; set; }
public static string ConfigPath { get; set; }
public static string AppDataDir { get; set; }
public static string AppDir { get; set; }
public static string AutoBackup { get; set; }
public static string SetUpdateFrequency { get; set; }
public static string OnceAWeek { get; set; }
public static string OnceAMonth { get; set; }
public static string OnceASeason { get; set; }
public static string NeverCheck { get; set; }
public static string SetRequestRepo { get; set; }
public static string ProtectOpenItem { get; set; }
public static string WebSearchEngine { get; set; }
public static string CustomEngine { get; set; }
public static string SetCustomEngine { get; set; }
public static string WinXSortable { get; set; }
public static string ShowFilePath { get; set; }
public static string OpenMoreRegedit { get; set; }
public static string OpenMoreExplorer { get; set; }
public static string HideDisabledItems { get; set; }
public static string HideSysStoreItems { get; set; }
public static string DimInferredIcons { get; set; }
public static string SetPerceivedType { get; set; }
public static string SetDefaultDropEffect { get; set; }
public static string TopMost { get; set; }
public static string Unknown { get; set; }
public static string RestoreItemText { get; set; }
public static string SearchContent { get; set; }
public static string StatusSearch { get; set; }
}
}
}