|
9 | 9 | namespace BootstrapBlazor.Components; |
10 | 10 |
|
11 | 11 | /// <summary> |
12 | | -/// 组件全局配置类 |
| 12 | +/// Global configuration class for components |
13 | 13 | /// </summary> |
14 | 14 | public class BootstrapBlazorOptions : IOptions<BootstrapBlazorOptions> |
15 | 15 | { |
16 | 16 | /// <summary> |
17 | | - /// 获得/设置 Toast 组件 Delay 默认值 默认为 0 |
| 17 | + /// Gets or sets the default delay for the Toast component, default is 0 |
18 | 18 | /// </summary> |
19 | 19 | public int ToastDelay { get; set; } |
20 | 20 |
|
21 | 21 | /// <summary> |
22 | | - /// 获得/设置 Message 组件 Delay 默认值 默认为 0 |
| 22 | + /// Gets or sets the default delay for the Message component, default is 0 |
23 | 23 | /// </summary> |
24 | 24 | public int MessageDelay { get; set; } |
25 | 25 |
|
26 | 26 | /// <summary> |
27 | | - /// 获得/设置 Swal 组件 Delay 默认值 默认为 0 |
| 27 | + /// Gets or sets the default delay for the Swal component, default is 0 |
28 | 28 | /// </summary> |
29 | 29 | public int SwalDelay { get; set; } |
30 | 30 |
|
31 | 31 | /// <summary> |
32 | | - /// 获得/设置 回落默认语言文化 默认为 en 英文 |
| 32 | + /// Gets or sets the fallback default language culture, default is "en" (English) |
33 | 33 | /// </summary> |
34 | 34 | public string FallbackCulture { get; set; } = "en"; |
35 | 35 |
|
36 | 36 | /// <summary> |
37 | | - /// 获得/设置 Toast 组件全局弹窗默认位置 默认为 null 当设置值后覆盖整站设置 |
| 37 | + /// Gets or sets the default position for the Toast component globally, default is null. When set, it overrides the site-wide setting. |
38 | 38 | /// </summary> |
39 | 39 | public Placement? ToastPlacement { get; set; } |
40 | 40 |
|
41 | 41 | /// <summary> |
42 | | - /// 获得/设置 组件内置本地化语言列表 默认为 null |
| 42 | + /// Gets or sets the list of built-in localization languages for components, default is null |
43 | 43 | /// </summary> |
44 | 44 | public List<string>? SupportedCultures { get; set; } |
45 | 45 |
|
46 | 46 | /// <summary> |
47 | | - /// 获得/设置 是否开启全局异常捕获功能 默认为 true |
| 47 | + /// Gets or sets whether to enable global exception capture functionality, default is true |
48 | 48 | /// </summary> |
49 | 49 | public bool EnableErrorLogger { get; set; } = true; |
50 | 50 |
|
51 | 51 | /// <summary> |
52 | | - /// 获得/设置 是否回落到 Fallback 文化 默认为 true |
| 52 | + /// Gets or sets whether to fall back to the fallback culture, default is true |
53 | 53 | /// </summary> |
54 | 54 | public bool EnableFallbackCulture { get; set; } = true; |
55 | 55 |
|
56 | 56 | /// <summary> |
57 | | - /// 获得/设置 是否忽略丢失文化日志信息 默认 null 未设置 |
| 57 | + /// Gets or sets whether to ignore missing culture log information, default is null (not set) |
58 | 58 | /// </summary> |
59 | | - /// <remarks>使用 <see cref="JsonLocalizationOptions.IgnoreLocalizerMissing"/> 默认值</remarks> |
| 59 | + /// <remarks>Uses the default value of <see cref="JsonLocalizationOptions.IgnoreLocalizerMissing"/></remarks> |
60 | 60 | public bool? IgnoreLocalizerMissing { get; set; } |
61 | 61 |
|
62 | 62 | /// <summary> |
63 | | - /// 获得/设置 是否禁用从服务中获取本地化资源 默认 false 未禁用 |
| 63 | + /// Gets or sets whether to disable fetching localization resources from the service, default is false (not disabled) |
64 | 64 | /// </summary> |
65 | 65 | public bool? DisableGetLocalizerFromService { get; set; } |
66 | 66 |
|
67 | 67 | /// <summary> |
68 | | - /// 获得/设置 是否禁用获取 <see cref="ResourceManagerStringLocalizer"/> 类型本地化资源 默认 false 未禁用 |
| 68 | + /// Gets or sets whether to disable fetching localization resources of type <see cref="ResourceManagerStringLocalizer"/>, default is false (not disabled) |
69 | 69 | /// </summary> |
70 | 70 | public bool? DisableGetLocalizerFromResourceManager { get; set; } |
71 | 71 |
|
72 | 72 | /// <summary> |
73 | | - /// 获得/设置 默认文化信息 |
| 73 | + /// Gets or sets the default culture information |
74 | 74 | /// </summary> |
75 | | - /// <remarks>开启多文化时此参数无效</remarks> |
| 75 | + /// <remarks>This parameter is invalid when multi-culture is enabled</remarks> |
76 | 76 | public string? DefaultCultureInfo { get; set; } |
77 | 77 |
|
78 | 78 | /// <summary> |
79 | | - /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 |
| 79 | + /// Gets or sets whether to disable the automatic form submission feature by pressing Enter, default is null (not set) |
80 | 80 | /// </summary> |
81 | 81 | public bool? DisableAutoSubmitFormByEnter { get; set; } |
82 | 82 |
|
83 | 83 | /// <summary> |
84 | | - /// 获得/设置 JavaScript 模块脚本版本号 默认为 null |
| 84 | + /// Gets or sets the JavaScript module script version number, default is null |
85 | 85 | /// </summary> |
86 | 86 | public string? JSModuleVersion { get; set; } |
87 | 87 |
|
88 | 88 | /// <summary> |
89 | | - /// 获得/设置 表格设置实例 |
| 89 | + /// Gets or sets the table settings instance |
90 | 90 | /// </summary> |
91 | 91 | public TableSettings TableSettings { get; set; } = new(); |
92 | 92 |
|
93 | 93 | /// <summary> |
94 | | - /// 获得/设置 <see cref="StepSettings"/> 配置实例 |
| 94 | + /// Gets or sets the <see cref="StepSettings"/> configuration instance |
95 | 95 | /// </summary> |
96 | 96 | public StepSettings StepSettings { get; set; } = new(); |
97 | 97 |
|
98 | 98 | /// <summary> |
99 | | - /// 获得/设置 <see cref="ConnectionHubOptions"/> 配置 默认不为空 |
| 99 | + /// Gets or sets the <see cref="ConnectionHubOptions"/> configuration, default is not null |
100 | 100 | /// </summary> |
101 | 101 | public ConnectionHubOptions ConnectionHubOptions { get; set; } = new(); |
102 | 102 |
|
103 | 103 | /// <summary> |
104 | | - /// 获得/设置 <see cref="WebClientOptions"/> 配置 默认不为空 |
| 104 | + /// Gets or sets the <see cref="WebClientOptions"/> configuration, default is not null |
105 | 105 | /// </summary> |
106 | 106 | public WebClientOptions WebClientOptions { get; set; } = new(); |
107 | 107 |
|
108 | 108 | /// <summary> |
109 | | - /// 获得/设置 <see cref="IpLocatorOptions"/> 配置 默认不为空 |
| 109 | + /// Gets or sets the <see cref="IpLocatorOptions"/> configuration, default is not null |
110 | 110 | /// </summary> |
111 | 111 | public IpLocatorOptions IpLocatorOptions { get; set; } = new(); |
112 | 112 |
|
113 | 113 | /// <summary> |
114 | | - /// 获得/设置 <see cref="ScrollOptions"/> 配置 默认不为空 |
| 114 | + /// Gets or sets the <see cref="ScrollOptions"/> configuration, default is not null |
115 | 115 | /// </summary> |
116 | 116 | public ScrollOptions ScrollOptions { get; set; } = new(); |
117 | 117 |
|
118 | 118 | /// <summary> |
119 | | - /// 获得/设置 <see cref="ContextMenuOptions"/> 配置 默认不为空 |
| 119 | + /// Gets or sets the <see cref="ContextMenuOptions"/> configuration, default is not null |
120 | 120 | /// </summary> |
121 | 121 | public ContextMenuOptions ContextMenuOptions { get; set; } = new(); |
122 | 122 |
|
123 | 123 | /// <summary> |
124 | | - /// 获得/设置 CacheManagerOptions 配置 默认不为空 |
| 124 | + /// Gets or sets the CacheManagerOptions configuration, default is not null |
125 | 125 | /// </summary> |
126 | 126 | public CacheManagerOptions CacheManagerOptions { get; set; } = new(); |
127 | 127 |
|
128 | 128 | BootstrapBlazorOptions IOptions<BootstrapBlazorOptions>.Value => this; |
129 | 129 |
|
130 | 130 | /// <summary> |
131 | | - /// 获得支持多语言集合 |
| 131 | + /// Gets the collection of supported languages |
132 | 132 | /// </summary> |
133 | 133 | /// <returns></returns> |
134 | 134 | public IList<CultureInfo> GetSupportedCultures() => SupportedCultures?.Select(name => new CultureInfo(name)).ToList() |
|
0 commit comments