diff --git a/src/BootstrapBlazor.Server/Components/Pages/Error.razor b/src/BootstrapBlazor.Server/Components/Pages/Error.razor
index 79929d78321..4b1e178ebc4 100644
--- a/src/BootstrapBlazor.Server/Components/Pages/Error.razor
+++ b/src/BootstrapBlazor.Server/Components/Pages/Error.razor
@@ -1,5 +1,4 @@
-@page "/error"
-
+@page "/error"
Error.
An error occurred while processing your request.
@@ -13,4 +12,4 @@
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
and restarting the app.
-
\ No newline at end of file
+
diff --git a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs
index 625e878dcf8..643e7f834ad 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs
@@ -182,7 +182,7 @@ private Task OnMaxSelectedCountExceed()
private Task OnTreeItemChecked(List> items)
{
- Logger2.Log($"当前共选中{items.Count}项");
+ Logger2.Log($"当前共选中 {items.Count} 项");
return Task.CompletedTask;
}
@@ -201,9 +201,7 @@ private static List GetDraggableItems()
new() { Text = "Item C", Id = "3", Icon = "fa-solid fa-font-awesome" },
new() { Text = "Item H", Id = "7", ParentId = "3", Icon = "fa-solid fa-font-awesome" },
- new() { Text = "Item I", Id = "8", ParentId = "3", Icon = "fa-solid fa-font-awesome" },
-
-
+ new() { Text = "Item I", Id = "8", ParentId = "3", Icon = "fa-solid fa-font-awesome" }
];
return _dragItems;
}
diff --git a/src/BootstrapBlazor/Components/Tab/TabItemContent.cs b/src/BootstrapBlazor/Components/Tab/TabItemContent.cs
index 6af1b64e590..035f6dc0a4d 100644
--- a/src/BootstrapBlazor/Components/Tab/TabItemContent.cs
+++ b/src/BootstrapBlazor/Components/Tab/TabItemContent.cs
@@ -12,7 +12,7 @@ class TabItemContent : IComponent, IHandlerException, IDisposable
{
///
/// 获得/设置 标签项,默认为 null
- /// Gets or sets the component content. Default is null.
+ /// Gets or sets the component content. Default is null
///
[Parameter, NotNull]
public TabItem? Item { get; set; }
diff --git a/src/BootstrapBlazor/Extensions/LocalizationOptionsExtensions.cs b/src/BootstrapBlazor/Extensions/LocalizationOptionsExtensions.cs
index 113ad54bba7..121f021449c 100644
--- a/src/BootstrapBlazor/Extensions/LocalizationOptionsExtensions.cs
+++ b/src/BootstrapBlazor/Extensions/LocalizationOptionsExtensions.cs
@@ -16,26 +16,16 @@ namespace BootstrapBlazor.Components;
internal static class LocalizationOptionsExtensions
{
///
- /// 通过系统 JsonLocalizationOptions 获取当前 Json 格式资源配置集合
- /// Get the current Json format resource configuration collection through the system JsonLocalizationOptions
+ /// 通过系统 获取当前 Json 格式资源配置集合
+ /// Get the current Json format resource configuration collection through the system
///
///
///
///
public static IEnumerable GetJsonStringFromAssembly(this JsonLocalizationOptions option, Assembly assembly, string cultureName)
{
- // 创建配置 ConfigurationBuilder
- // Create configuration ConfigurationBuilder
var builder = new ConfigurationBuilder();
-
- // 获取程序集中的资源文件
- // Get the resource file in the assembly
var assemblies = new List() { assembly };
-
- // 获得主程序集资源文件
- // Get the main assembly resource file
- // 支持合并操作
- // Support merge operation
var entryAssembly = GetEntryAssembly();
if (assembly != entryAssembly)
{
@@ -49,15 +39,11 @@ public static IEnumerable GetJsonStringFromAssembly(this
var streams = assemblies.SelectMany(i => option.GetResourceStream(i, cultureName)).ToList();
- // 添加 Json 文件流到配置
- // Add Json file stream to configuration
foreach (var s in streams)
{
builder.AddJsonStream(s);
}
- // 获得配置外置资源文件
- // Get configuration external resource file
if (option.AdditionalJsonFiles != null)
{
var files = option.AdditionalJsonFiles.Where(f =>
@@ -71,11 +57,8 @@ public static IEnumerable GetJsonStringFromAssembly(this
}
}
- // 生成 IConfigurationRoot
- // Generate IConfigurationRoot
var config = builder.Build();
- // dispose json stream
foreach (var s in streams)
{
s.Dispose();
@@ -92,23 +75,17 @@ private static List GetResourceStream(this JsonLocalizationOptions optio
var resourceNames = assembly.GetManifestResourceNames();
var ret = new List();
- // 如果开启回落机制优先增加回落语言
- // If the fallback mechanism is enabled, priority is given to increasing the fallback language
if (option.EnableFallbackCulture)
{
AddStream(option.FallbackCulture);
}
- // 查找父资源
- // Find parent resources
var parentName = GetParentCultureName(cultureName).Value;
if (!string.IsNullOrEmpty(parentName) && !EqualFallbackCulture(parentName))
{
AddStream(parentName);
}
- // 当前文化资源
- // Current culture resources
if (!EqualFallbackCulture(cultureName))
{
AddStream(cultureName);
@@ -129,8 +106,6 @@ void AddStream(string name)
}
}
- // 开启回落机制并且当前文化信息与回落语言相同
- // Open the fallback mechanism and the current cultural information is the same as the fallback language
bool EqualFallbackCulture(string name) => option.EnableFallbackCulture && option.FallbackCulture == name;
}
diff --git a/src/BootstrapBlazor/Extensions/ToastServiceExtensions.cs b/src/BootstrapBlazor/Extensions/ToastServiceExtensions.cs
index b14a2c7ef75..78f5d059565 100644
--- a/src/BootstrapBlazor/Extensions/ToastServiceExtensions.cs
+++ b/src/BootstrapBlazor/Extensions/ToastServiceExtensions.cs
@@ -7,31 +7,29 @@ namespace BootstrapBlazor.Components;
///
/// ToastService 扩展方法
-/// ToastService 扩展方法
+/// ToastService extension methods
///
public static class ToastServiceExtensions
{
- // 特别备注:此处方法使用三个参数被 UniLite 插件系统使用,请勿删除
-
///
/// Toast 调用成功快捷方法
- /// Toast 调用成功快捷方法
+ /// Toast success shortcut method
///
///
- /// Title 属性Title property
- /// Content 属性Content property
- /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true
+ ///
+ ///
+ ///
public static Task Success(this ToastService service, string? title = null, string? content = null, bool autoHide = true) => Success(service, title, content, autoHide, true);
///
/// Toast 调用成功快捷方法
- /// Toast 调用成功快捷方法
+ /// Toast success shortcut method
///
///
- /// Title 属性Title property
- /// Content 属性Content property
- /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true
- /// 是否显示关闭按钮 默认 truewhetherdisplay关闭button default is true
+ ///
+ ///
+ ///
+ ///
public static Task Success(this ToastService service, string? title, string? content, bool autoHide, bool showClose) => service.Show(new ToastOption()
{
Category = ToastCategory.Success,
@@ -43,23 +41,23 @@ public static Task Success(this ToastService service, string? title, string? con
///
/// Toast 调用错误快捷方法
- /// Toast 调用错误快捷方法
+ /// Toast error shortcut method
///
///
- /// Title 属性Title property
- /// Content 属性Content property
- /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true
+ ///
+ ///
+ ///
public static Task Error(this ToastService service, string? title = null, string? content = null, bool autoHide = true) => Error(service, title, content, autoHide, true);
///
/// Toast 调用错误快捷方法
- /// Toast 调用错误快捷方法
+ /// Toast error shortcut method
///
///
- /// Title 属性Title property
- /// Content 属性Content property
- /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true
- /// 是否显示关闭按钮 默认 truewhetherdisplay关闭button default is true
+ ///
+ ///
+ ///
+ ///
public static Task Error(this ToastService service, string? title, string? content, bool autoHide, bool showClose) => service.Show(new ToastOption()
{
Category = ToastCategory.Error,
@@ -71,23 +69,23 @@ public static Task Error(this ToastService service, string? title, string? conte
///
/// Toast 调用提示信息快捷方法
- /// Toast 调用提示信息快捷方法
+ /// Toast information shortcut method
///
///
- /// Title 属性Title property
- /// Content 属性Content property
- /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true
+ ///
+ ///
+ ///
public static Task Information(this ToastService service, string? title = null, string? content = null, bool autoHide = true) => Information(service, title, content, autoHide, true);
///
/// Toast 调用提示信息快捷方法
- /// Toast 调用提示信息快捷方法
+ /// Toast information shortcut method
///
///
- /// Title 属性Title property
- /// Content 属性Content property
- /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true
- /// 是否显示关闭按钮 默认 truewhetherdisplay关闭button default is true
+ ///
+ ///
+ ///
+ ///
public static Task Information(this ToastService service, string? title, string? content, bool autoHide, bool showClose) => service.Show(new ToastOption()
{
Category = ToastCategory.Information,
@@ -99,23 +97,23 @@ public static Task Information(this ToastService service, string? title, string?
///
/// Toast 调用警告信息快捷方法
- /// Toast 调用警告信息快捷方法
+ /// Toast warning shortcut method
///
///
- /// Title 属性Title property
- /// Content 属性Content property
- /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true
+ ///
+ ///
+ ///
public static Task Warning(this ToastService service, string? title = null, string? content = null, bool autoHide = true) => Warning(service, title, content, autoHide, true);
///
/// Toast 调用警告信息快捷方法
- /// Toast 调用警告信息快捷方法
+ /// Toast warning shortcut method
///
///
- /// Title 属性Title property
- /// Content 属性Content property
- /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true
- /// 是否显示关闭按钮 默认 truewhetherdisplay关闭button default is true
+ ///
+ ///
+ ///
+ ///
public static Task Warning(this ToastService service, string? title, string? content, bool autoHide, bool showClose) => service.Show(new ToastOption()
{
Category = ToastCategory.Warning,