From c0757ce017f9dc5fdbd13f5173c9fcd9c10d23e6 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 11:47:09 +0800 Subject: [PATCH 1/9] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/Block/Block.cs | 3 +-- .../Extensions/BootstrapBlazorServiceCollectionExtensions.cs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/BootstrapBlazor/Components/Block/Block.cs b/src/BootstrapBlazor/Components/Block/Block.cs index 2db61135435..24b9664a673 100644 --- a/src/BootstrapBlazor/Components/Block/Block.cs +++ b/src/BootstrapBlazor/Components/Block/Block.cs @@ -131,8 +131,7 @@ private async Task ProcessAuthorizeAsync() } /// - /// BuildRenderTree 方法 - /// BuildRenderTree method + /// /// /// protected override void BuildRenderTree(RenderTreeBuilder builder) diff --git a/src/BootstrapBlazor/Extensions/BootstrapBlazorServiceCollectionExtensions.cs b/src/BootstrapBlazor/Extensions/BootstrapBlazorServiceCollectionExtensions.cs index cb004e24553..4c40b405fee 100644 --- a/src/BootstrapBlazor/Extensions/BootstrapBlazorServiceCollectionExtensions.cs +++ b/src/BootstrapBlazor/Extensions/BootstrapBlazorServiceCollectionExtensions.cs @@ -179,7 +179,7 @@ void SetFallbackCulture() /// /// /// - [Obsolete("已弃用 请删除即可")] + [Obsolete("已弃用 直接删除即可。Deprecated. Delete it directly.")] [ExcludeFromCodeCoverage] public static IServiceCollection ConfigureIPLocatorOption(this IServiceCollection services, Action? locatorAction = null) { From 54bb044d106847ba0f8333ad709e0517ff06d591 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 11:58:23 +0800 Subject: [PATCH 2/9] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=20EventTable?= =?UTF-8?q?=20=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/Alerts.razor | 2 -- .../Components/Samples/Alerts.razor.cs | 16 +-------- .../Components/Samples/Calendars.razor | 2 -- .../Components/Samples/Calendars.razor.cs | 16 +-------- .../Components/Samples/Cascaders.razor | 2 -- .../Components/Samples/Cascaders.razor.cs | 14 -------- .../Components/Samples/CheckboxLists.razor | 2 -- .../Components/Samples/CheckboxLists.razor.cs | 22 +----------- .../Components/Samples/Checkboxs.razor | 2 -- .../Components/Samples/Checkboxs.razor.cs | 28 +-------------- .../Components/Samples/DateTimePickers.razor | 2 -- .../Samples/DateTimePickers.razor.cs | 28 +-------------- .../Components/Samples/DateTimeRanges.razor | 2 -- .../Samples/DateTimeRanges.razor.cs | 34 +----------------- .../Components/Samples/Dropdowns.razor | 2 -- .../Components/Samples/Dropdowns.razor.cs | 28 +-------------- .../Components/Samples/MultiSelects.razor | 2 -- .../Components/Samples/MultiSelects.razor.cs | 23 +----------- .../Components/Samples/PopoverConfirms.razor | 2 -- .../Samples/PopoverConfirms.razor.cs | 28 +-------------- .../Components/Samples/Radios.razor | 3 -- .../Components/Samples/Radios.razor.cs | 16 +-------- .../Components/Samples/Rates.razor | 2 -- .../Components/Samples/Rates.razor.cs | 12 +------ .../Components/Samples/SelectGenerics.razor | 2 -- .../Samples/SelectGenerics.razor.cs | 36 ++----------------- .../Components/Samples/Selects.razor | 2 -- .../Components/Samples/Selects.razor.cs | 32 ----------------- .../Components/Samples/Sliders.razor | 2 -- .../Components/Samples/Sliders.razor.cs | 16 +-------- .../Components/Samples/Switches.razor | 2 -- .../Components/Samples/Switches.razor.cs | 16 +-------- .../Components/Samples/Tags.razor | 2 -- .../Components/Samples/Tags.razor.cs | 16 +-------- .../Components/Samples/Toggles.razor | 2 -- .../Components/Samples/Toggles.razor.cs | 15 +------- .../Components/Samples/Transfers.razor | 2 -- .../Components/Samples/Transfers.razor.cs | 22 +----------- 38 files changed, 18 insertions(+), 439 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor b/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor index d0e14f9e069..98982165d2d 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor @@ -67,5 +67,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs index e17f24023f8..e7e888a192f 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -102,18 +102,4 @@ private Task DismissClick() Logger.Log("Alert Dismissed"); return Task.CompletedTask; } - - /// - /// 获得事件方法 - /// - /// - private static EventItem[] GetEvents() => - [ - new() - { - Name = "OnDismiss", - Description = "Close the alert box callback method", - Type = "EventCallback" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor b/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor index 42a5e02c6c7..5c8f1f45710 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor @@ -152,5 +152,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs index 0a951fa8478..fa7329cd1f8 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -33,18 +33,4 @@ private void OnValueChanged(DateTime ts) private List GetCrewsByDate(DateTime d) => Data.GetOrAdd(d, CalendarDemoDataHelper.GetCrewsByDate); private int GetSumByName(string name) => Data.Where(d => d.Key.Month == CrewInfoValue.Month).Sum(d => d.Value.FirstOrDefault(v => v.Name == name)?.Value ?? 0); - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new EventItem() - { - Name = "ValueChanged", - Description = Localizer["ValueChanged"], - Type ="EventCallback" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor b/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor index 6a4fa09dd85..4d3b9e6117b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor @@ -127,5 +127,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs index 6fd9a2fbc87..df774349846 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor.cs @@ -74,20 +74,6 @@ protected override void OnInitialized() _items[2].AddItem(new CascaderItem("item3_child2", Localizer["item3_child2"])); } - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = nameof(Cascader.OnSelectedItemChanged), - Description = Localizer["Event1"], - Type ="Func" - } - ]; - private async Task OnValidate() { await ValidateForm1.ValidateAsync(); diff --git a/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor b/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor index d69a4848d13..eddf3508638 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor @@ -148,5 +148,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs index f5bb5b45442..2b3173ede58 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -169,24 +169,4 @@ class IconSelectedItem : SelectedItem { public string? Icon { get; init; } } - - /// - /// Get event method - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnSelectedChanged", - Description = Localizer["Event1"], - Type ="Func, TValue, Task>" - }, - new() - { - Name = nameof(CheckboxList.OnMaxSelectedCountExceed), - Description = Localizer["AttributeOnMaxSelectedCountExceed"], - Type = "Func" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor b/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor index acd2f32127b..be5bf1c61e8 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor @@ -160,5 +160,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs index 53582671e41..3c246d0ddbd 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -64,30 +64,4 @@ private Task OnBeforeStateChanged(CheckboxState state) => SwalService.Show Title = Localizer["OnBeforeStateChangedSwalTitle"], Content = Localizer["OnBeforeStateChangedSwalContent"] }); - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnBeforeStateChanged", - Description = Localizer["OnBeforeStateChanged"], - Type ="Action" - }, - new() - { - Name = "OnStateChanged", - Description = Localizer["OnStateChanged"], - Type ="Action" - }, - new() - { - Name = "StateChanged", - Description = Localizer["StateChanged"], - Type ="EventCallback" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor index 07ff360b4b8..b0cc8be8d60 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor @@ -243,5 +243,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs index 7f3927f7695..c28cd05715c 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -140,30 +140,4 @@ private Task OnDisabledDaysChanged(bool v) _picker2.ClearDisabledDays(); return Task.CompletedTask; } - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnClickConfirm", - Description = Localizer["Event1"], - Type ="Action" - }, - new() - { - Name = "ValueChanged", - Description = Localizer["Event2"], - Type ="EventCallback" - }, - new() - { - Name = "OnGetDisabledDaysCallback", - Description = Localizer["OnGetDisabledDaysCallbackEvent"], - Type ="Func>>" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor b/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor index f3b050865d1..0fe8276d2a8 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor @@ -132,5 +132,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs index ca6fe3b3462..58605024373 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -126,36 +126,4 @@ private class ValidateFormRangeFoo : Foo } private DateTimeRangeValue AutoCloseDateTimeRangeValue { get; set; } = new(); - - /// - /// 获得事件方法 - /// - /// - private static List GetEvents() => - [ - new() - { - Name = "OnConfirm", - Description="Confirm callback delegate", - Type ="Action" - }, - new() - { - Name = "OnClearValue", - Description="Clear callback delegate", - Type ="Action" - }, - new() - { - Name = "OnValueChanged", - Description="ValueChanged callback delegate", - Type ="Func" - }, - new() - { - Name = "OnDateClick", - Description="Date cell click event callback", - Type ="Func" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor b/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor index d38dcfec97b..0a9bd291b6e 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor @@ -214,5 +214,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs index e02908a9aa2..f2585aa6e52 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -164,30 +164,4 @@ private async Task OnIsAsyncClick() } private Task OnClickAction(string actionName) => ToastService.Information("Custom Action", $"Trigger {actionName}"); - - /// - /// GetEvents - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnClick", - Description = Localizer["EventDesc1"], - Type ="EventCallback" - }, - new() - { - Name = "OnClickWithoutRender", - Description = Localizer["EventDesc2"], - Type ="Func" - }, - new EventItem() - { - Name = "OnSelectedItemChanged", - Description= Localizer["EventOnSelectedItemChanged"], - Type ="Func" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor index 04519c601b1..0ffc066a129 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor @@ -360,5 +360,3 @@ private enum MultiSelectEnumFoo - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs index 7ad9a96a54e..eecba5f33b2 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -335,25 +335,4 @@ private async Task OnCascadeBindSelectClick(SelectedItem item) } StateHasChanged(); } - - /// - /// 获得事件方法 - /// GetEvents - /// - /// - private EventItem[] GetEvents() => - [ - new EventItem() - { - Name = "OnSelectedItemsChanged", - Description = Localizer["MultiSelectsEvent_OnSelectedItemsChanged"], - Type = "Func" - }, - new EventItem() - { - Name = "OnSearchTextChanged", - Description = Localizer["MultiSelectsEvent_OnSearchTextChanged"], - Type = "Func>" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor b/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor index 2f0fa88f0c7..f169a0f2d1b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor @@ -184,5 +184,3 @@ private Func<Task>? OnConfirmAsync { get; set; } - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs index b468dff13b2..2771b69e724 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -64,30 +64,4 @@ private Task OnInValidSubmit(EditContext context) FormLogger.Log("数据非法"); return Task.CompletedTask; } - - /// - /// Get event method - /// - /// - private static EventItem[] GetEvents() => - [ - new() - { - Name = "OnConfirm", - Description="Callback method when confirm is clicked", - Type ="Func" - }, - new() - { - Name = "OnClose", - Description="Callback method when click close", - Type ="Func" - }, - new() - { - Name = "OnBeforeClick", - Description="Click the callback method before confirming the pop-up window", - Type ="Func>" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Radios.razor b/src/BootstrapBlazor.Server/Components/Samples/Radios.razor index b67d0d38a90..162886ffcce 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Radios.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Radios.razor @@ -137,6 +137,3 @@ - - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs index f796d4bf76d..c2b8b46ae93 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -120,18 +120,4 @@ class IconSelectedItem : SelectedItem { public string? Icon { get; init; } } - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnSelectedChanged", - Description = Localizer["RadiosOnSelectedChangedEvent"], - Type ="Func, TValue, Task>" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Rates.razor b/src/BootstrapBlazor.Server/Components/Samples/Rates.razor index d689c36e7ad..1aa5e8e0832 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Rates.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Rates.razor @@ -69,5 +69,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Rates.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Rates.razor.cs index f1ed7161027..d58e27fc6ad 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Rates.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Rates.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -50,14 +50,4 @@ private void OnValueChanged(double val) 3 => Localizer["RatesSurprise"], _ => Localizer["RatesGrin"] }; - - private EventItem[] GetEvents() => - [ - new() - { - Name = "ValueChanged", - Description =Localizer["RatesEvent1"], - Type ="EventCallback" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor b/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor index 52094a85449..0d8678c8ff7 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor @@ -438,5 +438,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor.cs index 1d49e2c146f..b5ea97d70b2 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -261,7 +261,7 @@ private async Task TextConvertToValueCallback(string v) if (item == null) { var id = _genericItems.Count + 1; - foo = new Foo() { Id = id, Address = $"New Address - {id}" }; + foo = new Foo() { Id = id, Address = $"New Address - {id}" }; var fooItem = new SelectedItem { Text = v, Value = foo }; _genericItems.Add(fooItem); } @@ -271,36 +271,4 @@ private async Task TextConvertToValueCallback(string v) } return foo!; } - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnSelectedItemChanged", - Description = Localizer["SelectsOnSelectedItemChanged"], - Type = "Func" - }, - new() - { - Name = "OnBeforeSelectedItemChange", - Description = Localizer["SelectsOnBeforeSelectedItemChange"], - Type = "Func>" - }, - new() - { - Name = "OnInputChangedCallback", - Description = Localizer["SelectsOnInputChangedCallback"], - Type = "Func" - }, - new() - { - Name = "TextConvertToValueCallback", - Description = Localizer["SelectsTextConvertToValueCallback"], - Type = "Func>" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Selects.razor b/src/BootstrapBlazor.Server/Components/Samples/Selects.razor index 4a61f2f8dd0..5c7f74f407b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Selects.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Selects.razor @@ -475,5 +475,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs index c3f8f9a0c08..9a0b6636f76 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs @@ -267,36 +267,4 @@ private Task OnTimeZoneValueChanged(string timeZoneId) StateHasChanged(); return Task.CompletedTask; } - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnSelectedItemChanged", - Description = Localizer["SelectsOnSelectedItemChanged"], - Type = "Func" - }, - new() - { - Name = "OnBeforeSelectedItemChange", - Description = Localizer["SelectsOnBeforeSelectedItemChange"], - Type = "Func>" - }, - new() - { - Name = "OnInputChangedCallback", - Description = Localizer["SelectsOnInputChangedCallback"], - Type = "Func" - }, - new() - { - Name = "TextConvertToValueCallback", - Description = Localizer["SelectsTextConvertToValueCallback"], - Type = "Func>" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor b/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor index b45cdae9ae4..b95f13150c8 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor @@ -103,5 +103,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor.cs index 2d1378ce0d9..1fbf3b834d7 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -42,18 +42,4 @@ private Task OnRangeSliderValueChanged(double value) Logger.Log($"RangeSlider: Bind Value: {value}"); return Task.CompletedTask; } - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "ValueChanged", - Description = Localizer["SlidersValueChanged"], - Type ="EventCallback" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Switches.razor b/src/BootstrapBlazor.Server/Components/Samples/Switches.razor index 203bfbdf01b..cd6bc36b1ae 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Switches.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Switches.razor @@ -93,5 +93,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Switches.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Switches.razor.cs index 9469bb9973f..99311927517 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Switches.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Switches.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -32,18 +32,4 @@ private class Foo } private Foo Model { get; set; } = new Foo(); - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "ValueChanged", - Description = Localizer["SwitchesEventValueChanged"], - Type = "EventCallback" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Tags.razor b/src/BootstrapBlazor.Server/Components/Samples/Tags.razor index 2b22a025f5a..8b143027fd3 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Tags.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Tags.razor @@ -82,5 +82,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Tags.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Tags.razor.cs index 787ff5c10ef..9db7d89699d 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Tags.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Tags.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -18,18 +18,4 @@ private Task DismissClick() Logger.Log($"Tag Dismissed"); return Task.CompletedTask; } - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnDismiss", - Description = Localizer["TagsOnDismiss"], - Type ="EventCallback" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor b/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor index bad9db8c908..f05b0b1d3af 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor @@ -105,5 +105,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs index 63b673251ff..023fbc946e9 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -30,17 +30,4 @@ private class Foo [DisplayName("绑定标签")] public bool BindValue { get; set; } } - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new EventItem() - { - Name = "ValueChanged", - Description = Localizer["ValueChanged"], - Type = "EventCallback" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor b/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor index c6a51737366..6bf0336641c 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor @@ -120,5 +120,3 @@ - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor.cs index 2b41766b0dd..79960138da0 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -106,24 +106,4 @@ private void OnAddItem() "8" => "bg-warning text-white", _ => null }; - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = nameof(Transfer.OnSelectedItemsChanged), - Description = Localizer["OnSelectedItemsChanged"], - Type = "Func, Task>" - }, - new() - { - Name = "OnSetItemClass", - Description = Localizer["OnSetItemClass"], - Type = "Func" - } - ]; } From 27ce665baf2746c57a5a0538a215a32b27b71ac5 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 12:20:38 +0800 Subject: [PATCH 3/9] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=20CustomerFilter?= =?UTF-8?q?=20=E6=9C=AC=E5=9C=B0=E5=8C=96=E8=B5=84=E6=BA=90=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Components/CustomerFilter.razor.cs | 6 ++---- src/BootstrapBlazor.Server/Locales/en-US.json | 6 ++++++ src/BootstrapBlazor.Server/Locales/zh-CN.json | 6 ++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Components/CustomerFilter.razor.cs b/src/BootstrapBlazor.Server/Components/Components/CustomerFilter.razor.cs index f13164565b9..40398b05708 100644 --- a/src/BootstrapBlazor.Server/Components/Components/CustomerFilter.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Components/CustomerFilter.razor.cs @@ -1,10 +1,8 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using BootstrapBlazor.Server.Components.Samples.Table; - namespace BootstrapBlazor.Server.Components.Components; /// @@ -14,7 +12,7 @@ public partial class CustomerFilter { [Inject] [NotNull] - private IStringLocalizer? TableFilterLocalizer { get; set; } + private IStringLocalizer? TableFilterLocalizer { get; set; } private int? _value; diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index df15c2cfa73..044290c777a 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -27,6 +27,12 @@ "BootstrapBlazor.Server.Components.Components.CultureChooser": { "Label": "Language:" }, + "BootstrapBlazor.Server.Components.Components.CustomerFilter": { + "CustomerFilterItem1": "All", + "CustomerFilterItem2": "Greater than 10", + "CustomerFilterItem3": "Greater than 50", + "CustomerFilterItem4": "Greater than 80" + }, "BootstrapBlazor.Server.Components.Components.CustomPopConfirmContent": { "CustomPopConfirmContentButtonText": "Approval", "CustomPopConfirmContentText": "Custom content" diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 6e1aa6a35a3..377594157ae 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -27,6 +27,12 @@ "BootstrapBlazor.Server.Components.Components.CultureChooser": { "Label": "语言:" }, + "BootstrapBlazor.Server.Components.Components.CustomerFilter": { + "CustomerFilterItem1": "全部", + "CustomerFilterItem2": "大于 10", + "CustomerFilterItem3": "大于 50", + "CustomerFilterItem4": "大于 80" + }, "BootstrapBlazor.Server.Components.Components.CustomPopConfirmContent": { "CustomPopConfirmContentButtonText": "审批", "CustomPopConfirmContentText": "自定义弹窗内容" From d6fd1d3ef939cb9f0593e5bbcd286675b385383c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 12:25:35 +0800 Subject: [PATCH 4/9] =?UTF-8?q?doc:=20=E7=A7=BB=E9=99=A4=E4=B8=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=94=AE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Locales/en-US.json | 93 +----------------- src/BootstrapBlazor.Server/Locales/zh-CN.json | 95 ++----------------- test/UnitTest.Localization/JsonTest.cs | 10 ++ 3 files changed, 21 insertions(+), 177 deletions(-) diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 044290c777a..2097688f261 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -733,12 +733,10 @@ "BootstrapBlazor.Server.Components.Samples.Ajaxs": { "AjaxDescribe": "The ajax method used to use js directly in the browser to interact with the server currently only supports both input and output as json, and the return value is a json string, which can be converted and processed by itself.", "AjaxTitle": "Ajax call", - "GoTo": "Execute goto", "GoToButtonText1": "Jump to the first page of the document", "GoToButtonText2": "Jump to yourself (refresh page)", "GoToIntro": "Implementing page jumps with Js addresses an issue where Blazor pages don't really refresh when they're jumped as SPA ", "GoToTitle": "Page jump", - "InvokeAsync": "Execute fetch", "NormalB": "Special attention:", "NormalButtonText1": "Login successful", "NormalButtonText2": "Login failed", @@ -990,9 +988,7 @@ }, "BootstrapBlazor.Server.Components.Samples.BrowserFingers": { "BrowserFingerIntro": "Obtain the client browser fingerprint by calling the IBrowserFingerService service instance method GetFingerCodeAsync. The fingerprint is consistent in privacy mode", - "BrowserFingerTitle": "Browser fingerprint", - "GetClientHubIdAsync": "Method for obtaining client hub Id", - "GetFingerCodeAsync": "Method for obtaining fingerprints" + "BrowserFingerTitle": "Browser fingerprint" }, "BootstrapBlazor.Server.Components.Samples.Buttons": { "Block1Intro": "The underlying button usage.", @@ -1028,8 +1024,6 @@ "Description": "Common action buttons.", "Description1": "Button disable effects can be achieved by setting its own IsDisabled property in the OnClick callback method, or by calling the component instance method SetDisable", "Description2": "Because using the IsDisabled property requires an explicit manual call to the StateHasChanged method, which causes the component where the button is located to refresh as a whole, it is recommended that you use the instance method SetDisable refresh the button only", - "EventDesc1": "This event is triggered when the button is clicked", - "EventDesc2": "This event is triggered when the button is clicked and the current component is not refreshed for performance improvement", "ExtraLargeButton": "ExtraLarge", "ExtraSmallButton": "ExtraSmall", "HighlightButton": "Highlight", @@ -1038,7 +1032,6 @@ "LargeButton": "Large", "LinkButton": "Link", "MediumButton": "Medium", - "MethodDesc1": "set whether the button is available", "NoneButtonColor": "None", "NormalButton": "Button", "PrimaryButton": "Primary", @@ -1079,7 +1072,6 @@ "Study": "Study", "SubTitle": "Containers that display data as calendars. When the data is date or by date, such as schedule, schedule, price calendar, etc., lunar calendar, etc. Year/month switching is currently supported.", "Title": "Calendar", - "ValueChanged": "Call back the delegate when the value changes", "ViewModeIntro": "By setting the property CalendarViewMode.Week", "ViewModeTitle": "Show by week" }, @@ -1105,11 +1097,9 @@ "BootstrapBlazor.Server.Components.Samples.Captchas": { "BasicUsageIntro": "Simple human-machine identification", "BasicUsageTitle": "Basic usage", - "GetImageName": "Custom method for getting the name of the background map file", "ImageCallbackIntro": "Set a custom method to stitch the full path name of a random picture by GetImageName", "ImageCallbackTitle": "Specify the graph bed delegate method", "ImageTitle": "Specify the path and name of the graph bed", - "OnValid": "The slider verification code calls back this method after the validation results are determined", "SubTitle": "Human-machine recognition by dragging the slider", "Title": "Captchas" }, @@ -1186,7 +1176,6 @@ "Divider1": "Bidirectional binding displays labels", "Divider2": "Bidirectional bindings do not display labels", "Divider3": "Customize DisplayText", - "Event1": "This event is triggered when the cascading selection option changes", "item1": "Melbourne", "item1_child1": "Brunswick", "item1_child1_child": "so-and-so street", @@ -1300,7 +1289,6 @@ "PieNormalTitle": "Pie diagram" }, "BootstrapBlazor.Server.Components.Samples.CheckboxLists": { - "AttributeOnMaxSelectedCountExceed": "Select the callback method when the maximum number of nodes is reached", "CheckboxListGenericIntro": "Enable generic support by using the RadioListGeneric component with SelectedItem<TValue>", "CheckboxListGenericTitle": "Generic List", "CheckboxListsTip": "The control is used to create a multi-select check box group", @@ -1311,7 +1299,6 @@ "EnumIntro": "The binding value is enumeration", "EnumTip": "When CheckboxList binds an enumeration set, Items does not need to be specified, Items will be automatically set to all values in the enumeration. If you need to bind some values, please provide the enumeration set Items", "EnumTitle": "Bidirectional binding enumeration", - "Event1": "Call back this method when the state of the check box changes", "Foo": "Pat,Argo", "Header": "common", "IsButtonIntro": "Set IsButton=\"true\" to change the checkbox style to a button style", @@ -1361,13 +1348,11 @@ "ItemTemplateTitle": "ItemTemplate", "NormalIntro": "Using alone can represent a switch between two states, and column head or header can represent a switch between three states when used. Components support generic data binding, setting the binding data type the TValue, and setting the component state by State", "NormalTitle": "Basic usage", - "OnBeforeStateChanged": "This method is called back before the selection box status changes", "OnBeforeStateChangedIntro": "By setting the OnBeforeStateChanged callback method, you can cancel the state change logic", "OnBeforeStateChangedSwalContent": "Whether the current checkbox is selected", "OnBeforeStateChangedSwalTitle": "Confirm Select", "OnBeforeStateChangedText": "Confirm", "OnBeforeStateChangedTitle": "OnBeforeStateChanged", - "OnStateChanged": "This method is called back when the selection box state changes", "OnStateChangedIntro": "Binding variables within a component, data automatically synchronized, binding data types boolean type when the value is automatically flipped", "OnStateChangedTitle": "Two-way binding boolean", "ShowAfterLabelDescription": "Set DisplayText property, or display text messages through bidirectional binding", @@ -1375,7 +1360,6 @@ "ShowAfterLabelTitle": "Label text", "ShowLabelIntro": "Change the component background color by setting the Color property", "ShowLabelTitle": "Color", - "StateChanged": "The state changes the callback method", "StatusText1": "Selected", "StatusText2": "Not selected", "StatusText3": "Indeterminate", @@ -1446,9 +1430,6 @@ "Title": "Get client connection information" }, "BootstrapBlazor.Server.Components.Samples.Clipboards": { - "ClipboardCopyMethod": "Copy text to the clipboard method", - "ClipboardGetMethod": "Method for reading clipboard content", - "ClipboardGetTextMethod": "Method for reading clipboard text content", "ClipboardIntro": "Clipboard service! Please note that it can only be run under HTTPS secure connections or used in the localhost development environment.", "ClipboardTitle": "ClipboardService" }, @@ -1612,8 +1593,6 @@ "DisableToday": "Disable today", "DisableWeekend": "Disable weekend", "DisplayText": "Select the time", - "Event1": "Confirm that the button calls back the delegate", - "Event2": "Callback delegates are used for bidirectional binding when component values change", "Feature": "Feature", "FeatureFestivalIntro": "The festival function is provided by the built-in service ICalendarFestivals in the component library. The built-in default implementation provides 12 Gregorian festivals and 7 lunar festivals, which can be extended through custom festival services. For detailed function introductions, please refer to the Festival Services documentation [Portal]", "FeatureIntro": "Holidays Functional dependency component packages BootstrapBlazor.Holiday [Portal]", @@ -1634,7 +1613,6 @@ "NullValueIntro": "More for conditional selection", "NullValueTip": "The emptybutton automatically appears when the binding value is DateTime? for an empty type", "NullValueTitle": "Allow empty time", - "OnGetDisabledDaysCallbackEvent": "Disable date callback method", "ShowIconIntro": "Save space by setting ShowIcon=\"false\" to not display component icons", "ShowIconTitle": "Whether show the component icon", "ShowLabelIntro": "When you are a form component, the label in front of the component is displayed", @@ -2009,14 +1987,6 @@ "Description": "For drag and drop", "EventIntro": "When the dragging quantity exceeds the limit OnItemDropRejectedByMaxItemLimit, when dragging is prohibited OnItemDropRejected, return to the bottom ItemOnReplacedItemDrop, return the dropped Item OnItemDrop", "EventTitle": "Various events", - "M1": "Whether to run drag and drop", - "M2": "Whether the node is allowed to be dragged", - "M3": "Copy a new Item to the target location", - "M4": "Add special css class for Item", - "M5": "Event when Item is released", - "M6": "Event when Item release is rejected", - "M7": "Event when Item is released on another Item, not blank space", - "M8": "Event when an Item is rejected because the maximum number in the Dropzone exceeds the limit", "NormalIntro": "simple drag and drop", "NormalTitle": "Basic usage", "Title": "DragDrop" @@ -2090,9 +2060,6 @@ "DropdownItemsTemplateTitle": "Items Template", "DropdownItemTemplateIntro": "By setting ItemTemplate, you can customize the content displayed in the drop-down item. In this example, the Tooltip component is used to add a tooltip function when the mouse is hovered.", "DropdownItemTemplateTitle": "Item Template", - "EventDesc1": "This event is triggered when the button is clicked", - "EventDesc2": "This event is triggered when the button is clicked and the current component is not refreshed for performance improvement", - "EventOnSelectedItemChanged": "Triggered when the value of the drop-down box changes", "FixedButtonTextIntro": "Set the FixedButtonText value for fixed button text", "FixedButtonTextTitle": "Set the fixed button text", "IsAsyncIntro": "By setting whether the isAsync property button is asynchronous request button by setting whether the is false by default", @@ -2779,17 +2746,13 @@ "IsDisabledTitle": "IsDisabled" }, "BootstrapBlazor.Server.Components.Samples.JSRuntimeExtensions": { - "EvalAttr": "Call Eval method", "EvalIntro": "Dynamically run Java Script code within the current scope using the Eval function.", "EvalTitle": "JS Eval", - "FunctionAttr": "Call Function method", "FunctionIntro": "Dynamically run Java Script code within the global scope through the Function function.", "FunctionTitle": "JS Function", - "IsMobileAttr": "Determine whether the current device is a mobile device", "IsMobileIntro": "Determine userAgent through regular expressions, indicating whether the current device is a mobile device", "IsMobileTitle": "GetIsMobileDevice", "JSTips": "Before use, import the module according to the following code", - "OpenUrlAttr": "Open a url in a specific window", "OpenUrlIntro": "Open url in a Window", "OpenUrlTips": "Default to:", "OpenUrlTitle": "OpenUrl" @@ -2994,8 +2957,7 @@ "ListViewsTitle": "ListView", "PaginationIntro": "Set the Pageable display paginated components", "PaginationTitle": "Paginated display", - "ProductListText": "The list of products", - "QueryAsync": "Manually query data methods" + "ProductListText": "The list of products" }, "BootstrapBlazor.Server.Components.Samples.Live2DDisplays": { "Live2DDisplayDescription": "Live2D Widget plugin based on pixi live2d display, supporting all versions of Live2D models.", @@ -3342,8 +3304,6 @@ "MultiSelectSearchIntro": "Turn on search by setting the ShowSearch value", "MultiSelectSearchLog": "Search for text", "MultiSelectSearchTitle": "Search function", - "MultiSelectsEvent_OnSearchTextChanged": "Call back this method when the search text changes", - "MultiSelectsEvent_OnSelectedItemsChanged": "This event is triggered when the drop-down option changes", "MultiSelectsTitle": "MultiSelect", "MultiSelectVeryLongTextDisplayText": "Extra long text", "MultiSelectVeryLongTextIntro": "The candidate text is particularly long", @@ -3659,7 +3619,6 @@ "RadiosLog3": "Component value:", "RadiosNormalIntro": "Select selectors are recommended because the options are visible by default and should not be too many", "RadiosNormalTitle": "Basic usage", - "RadiosOnSelectedChangedEvent": "Call back this method when the check box state changes", "RadiosTitle": "Radio", "RadiosVerticalIntro": "Make the components vertically arranged internally by setting the IsVertical", "RadiosVerticalTitle": "Vertical arrangement" @@ -3669,7 +3628,6 @@ "RatesDescription": "Scoring components", "RatesDisableIntro": "Disable components by setting IsDisable property to true", "RatesDisableTitle": "Disable", - "RatesEvent1": "Call back the delegate when the value changes", "RatesGrin": "Grin", "RatesIconIntro": "Set ItemTemplate and custom-rate custom the UI", "RatesIconTitle": "Item Template", @@ -3957,9 +3915,6 @@ "SelectsNullableDescription": "When the first option is selected, the binding value SelectIntItem to null", "SelectsNullableIntro": "an example of the Select component binding int? type", "SelectsNullableTitle": "The binding can be an empty type", - "SelectsOnBeforeSelectedItemChange": "This event is triggered before the drop-down option changes", - "SelectsOnInputChangedCallback": "Callback method for converting input text into corresponding Value in edit mode", - "SelectsOnSelectedItemChanged": "This event is triggered when the drop-down option changes", "SelectsOption1": "Please select ...", "SelectsOption2": "Beijing", "SelectsOption3": "Shanghai", @@ -4093,8 +4048,7 @@ "SlidersNormalTitle": "Basic usage", "SlidersRangeIntro": "Auto generate min max by set RangeAttribute", "SlidersRangeTitle": "Range", - "SlidersTitle": "Slider", - "SlidersValueChanged": "ValueChanged callback method" + "SlidersTitle": "Slider" }, "BootstrapBlazor.Server.Components.Samples.SmilesDrawers": { "SmilesDrawerDescription": "A small, highly performant JavaScript component for parsing and drawing SMILES strings", @@ -4432,7 +4386,6 @@ "SwitchesDescription": "The most common switching applications are available", "SwitchesDisableIntro": "Control the unavailable state of the component by setting the IsDisabled property", "SwitchesDisableTitle": "Disable the state", - "SwitchesEventValueChanged": "Gets the value of the selection change", "SwitchesInnerTextDescription": "By setting the onInnerText OffInnerText property to change the built-in text, a Chinese character is recommended by default to customize the component width to increase the amount of built-in text", "SwitchesInnerTextIntro": "By setting ShowInnerText property control component displays built-in text", "SwitchesInnerTextLabelText1": "Default text:", @@ -4892,11 +4845,7 @@ "TablesFilterDesc": "Filter to quickly find the data you want to see; sort to quickly find or compare data.", "TablesFilterDescLi1": "Filters a column of data to specify the column to be filtered by specifying the filterable property of the column", "TablesFilterDescLi2": "Sort a column of data, specify the column to be sorted by specifying the Sortable property of the column, change the collation by multiple clicks", - "TablesFilterTemplateDescription": "

The FilterTemplate type is RenderFragment its value is a custom component, and the component must inherit the filterBase In this case, the last column in this case, the Quantity column, uses the custom component by filtering the template CustomerFilter [portal] CustomerFilter component source code

Notes:

  • Custom filter components are wrapped with FilterProvider, and FilterProvider must be under the FilterTemplate node
  • Filters can be fine-tuned through the parameters of the FilterProvider component; for example, by setting ShowMoreButton to control whether the + - symbol is displayed
  • Before v9.6.2, use OnFilterValueChanged to trigger the filter callback. After refactoring, use OnFilterAsync to trigger the filter callback method.
  • ", - "CustomerFilterItem1": "All", - "CustomerFilterItem2": "Greater than 10", - "CustomerFilterItem3": "Greater than 50", - "CustomerFilterItem4": "Greater than 80" + "TablesFilterTemplateDescription": "

    The FilterTemplate type is RenderFragment its value is a custom component, and the component must inherit the filterBase In this case, the last column in this case, the Quantity column, uses the custom component by filtering the template CustomerFilter [portal] CustomerFilter component source code

    Notes:

    • Custom filter components are wrapped with FilterProvider, and FilterProvider must be under the FilterTemplate node
    • Filters can be fine-tuned through the parameters of the FilterProvider component; for example, by setting ShowMoreButton to control whether the + - symbol is displayed
    • Before v9.6.2, use OnFilterValueChanged to trigger the filter callback. After refactoring, use OnFilterAsync to trigger the filter callback method.
    • " }, "BootstrapBlazor.Server.Components.Samples.Table.TablesFixedColumn": { "TablesFixedColHeaderDescription": "In this example, set Name Education Count Complete The first two columns and the last column are fixed columns, and the middle columns are scrolled horizontally", @@ -5195,7 +5144,6 @@ "BlockHeaderTemplateDesc": "Use Badge in the HeaderTemplate", "BlockHeaderTemplateHeaderText": "Todo List", "DividerText": "Split Line", - "MethodTitle": "Method", "RemoveButtonText": "Rmove", "ShowTabInHeaderDesc": "After enabling the multi-tab function in the Layout component, you can render the Tab tag header into the Layout Header template by setting ShowTabInHeader=\"true\". The effect can be viewed by creating a new project in the Project Template", "TabItem1Content": "I am a user manager", @@ -5214,15 +5162,6 @@ "TabItem7Text": "Timed task", "TabItem8Text": "Count", "TabItem9Text": "Weather forecast", - "TabMethod1AddTab": "Add TabItem to Tab, can set new Tab position if necessary", - "TabMethod2RemoveTab": "Remove TabItem", - "TabMethod3ActiveTab": "The setting specifies tabItem as active", - "TabMethod4ClickPrevTab": "Switch to the previous label method", - "TabMethod5ClickNextTab": "Switch to the next label method", - "TabMethod6CloseCurrentTab": "Close the current tab method", - "TabMethod7CloseOtherTabs": "Close other tab methods", - "TabMethod8CloseAllTabs": "Close all tab methods", - "TabMethod9GetActiveTab": "Get current tab methods", "TabsAddTabItemIntro": "Dynamically add/remove TabItem by calling the component api", "TabsAddTabItemTitle": "Custom add tab triggers", "TabsAppDescription": "Dynamically adjust the number of TabItem by adding, deletebuttons to view the left and right effects beyond the number of containers, user management is set to not close, and the feature button cannot close this tab. The component switches tabs in a loop by default. You can disable this feature by IsLoopSwitchTabItem=\"false\"", @@ -5305,7 +5244,6 @@ "TagsIconTitle": "With Icon", "TagsNormalIntro": "Non floating elements in the page will not disappear automatically.", "TagsNormalTitle": "Basic usage", - "TagsOnDismiss": "Close label callback method", "TagsSubTitle": "Used for marking and selection.", "TagsTitle": "Tag" }, @@ -5500,8 +5438,7 @@ "TogglesOffText": "Off", "TogglesOnText": "On", "TogglesSubTitle": "The most common switching application is available with a value of true false", - "TogglesTitle": "Toggle", - "ValueChanged": "Gets the value of the selection change" + "TogglesTitle": "Toggle" }, "BootstrapBlazor.Server.Components.Samples.Toolbars": { "NormalTitle": "Normal", @@ -5542,8 +5479,6 @@ "Data": "Data", "LeftButtonText": "To the left", "LeftPanelText": "The list on the left", - "OnSelectedItemsChanged": "The callback method when the component binding data item collection options change", - "OnSetItemClass": "Set the Item style callback method", "PlaceHolder": "Please enter", "RightButtonText": "To the Right", "RightPanelText": "The list on the right", @@ -5801,8 +5736,6 @@ "OnValidSubmitLog": "OnValidSubmit callback delegate: Verification passed", "OnValidSubmitStartingLog": "OnValidSubmit callback delegate: Starting ...", "ResetButtonText": "Reset", - "SetError": "Set up a validation failure method", - "Validate": "Trigger form validate", "ValidateButtonText": "Save", "ValidateFormComplexValidationDescription": "The second binding in this example is a super-complex type ComplexModel.Dummy.Dummy2.Name Empty the value, click submit the formvalidate the data. After the second text box verifies compliance, the error prompt is displayed again by calling the SetError", "ValidateFormComplexValidationIntro": "Supports any complex type of binding and validation", @@ -6000,21 +5933,5 @@ "NullItemText": "Not Set", "ReadonlyColumn": "Readonly Column", "True": "Pass" - }, - "BootstrapBlazor.Server.Components.Components.BlazorReconnector": { - "Title": "Reconnector Component", - "ReconnectingTitle": "Attempting to reconnect to the server", - "ReconnectingDescription": "The server is updating to a new version, please wait a moment for service to be available, or press F12 to open Developer tools and check the console for any error output. Please scan the QR code on the left to join the group and contact the administrator", - "ReconnectButton": "Reconnect", - "ReconnectFailedTitle": "Failed to connect to server", - "ReconnectFailedDescription": "Please confirm that your network is working properly, or press F12 to open Developer tools and check the console for any error output. Please scan the QR code on the left to join the group and contact the administrator", - "ReloadButton": "Reload", - "ReconnectRejectedTitle": "Server rejected connection", - "ReconnectRejectedDescription": "All connection attempts have been rejected, which is most likely caused by network or server issues. Please scan the QR code on the left to join the group and contact the administrator", - "UILibraryTitle": "Bootstrap Blazor UI Component Library", - "UILibraryDescription1": "An enterprise-level Blazor UI component library based on Bootstrap styles, supporting both Server and WebAssembly", - "UILibraryDescription2": "Mobile-responsive, supports all major browsers and mobile devices, compatible with ABP, and supports {0}", - "TemplateLink": "Project Templates", - "TemplateText": "Project templates are provided for quick start" } } diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 377594157ae..3b4067fd8cb 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -733,12 +733,10 @@ "BootstrapBlazor.Server.Components.Samples.Ajaxs": { "AjaxDescribe": "用于直接在浏览器使用 fetch 方法与服务器交互,目前只支持输入输出皆为 json,返回值为 json 字符串,可以自行转换处理。", "AjaxTitle": "Ajax调用", - "GoTo": "执行 goto 方法", "GoToButtonText1": "跳转到文档首页", "GoToButtonText2": "跳转到自己(刷新页面)", "GoToIntro": "用 Js 实现页面跳转,解决了 Blazor 页面作为 SPA 跳转时不会真正刷新页面的问题", "GoToTitle": "页面跳转", - "InvokeAsync": "执行 fetch 方法", "NormalB": "特别注意:", "NormalButtonText1": "登录成功", "NormalButtonText2": "登录失败", @@ -990,9 +988,7 @@ }, "BootstrapBlazor.Server.Components.Samples.BrowserFingers": { "BrowserFingerIntro": "通过调用 IBrowserFingerService 服务实例方法 GetFingerCodeAsync 获得客户端浏览器指纹,隐私模式下指纹是一致的", - "BrowserFingerTitle": "浏览器指纹", - "GetClientHubIdAsync": "获得客户端连接 Id 方法", - "GetFingerCodeAsync": "获得指纹方法" + "BrowserFingerTitle": "浏览器指纹" }, "BootstrapBlazor.Server.Components.Samples.Buttons": { "Block1Intro": "基础的按钮用法。", @@ -1028,8 +1024,6 @@ "Description": "常用的操作按钮。", "Description1": "通过 OnClick 回调方法中设置自身 IsDisabled 属性,或者调用组件实例方法 SetDisable 均可实现按钮禁用效果", "Description2": "由于使用 IsDisabled 属性时,需要显式手动调用 StateHasChanged 方法,会导致按钮所在组件整体刷新,建议使用实例方法 SetDisable 仅对按钮进行刷新", - "EventDesc1": "点击按钮时触发此事件", - "EventDesc2": "点击按钮时触发此事件并且不刷新当前组件,用于提高性能时使用", "ExtraLargeButton": "超大按钮", "ExtraSmallButton": "超小按钮", "HighlightButton": "高亮按钮", @@ -1038,7 +1032,6 @@ "LargeButton": "大按钮", "LinkButton": "链接按钮", "MediumButton": "中等按钮", - "MethodDesc1": "设置按钮是否可用", "NoneButtonColor": "None 按钮", "NormalButton": "按钮", "PrimaryButton": "主要按钮", @@ -1079,7 +1072,6 @@ "Study": "自习", "SubTitle": "按照日历形式展示数据的容器。当数据是日期或按照日期划分时,例如日程、课表、价格日历等,农历等。目前支持年/月切换。", "Title": "Calendar 日历框", - "ValueChanged": "值改变时回调委托", "ViewModeIntro": "通过设置属性 CalendarViewMode.Week", "ViewModeTitle": "按周展示" }, @@ -1105,11 +1097,9 @@ "BootstrapBlazor.Server.Components.Samples.Captchas": { "BasicUsageIntro": "进行简单的人机识别", "BasicUsageTitle": "基础功能", - "GetImageName": "自定义获取背景图文件名称方法", "ImageCallbackIntro": "通过 GetImageName 设置自定义方法拼接随机图片全路径名称", "ImageCallbackTitle": "指定图床委托方法", "ImageTitle": "指定图床路径与名称", - "OnValid": "滑块验证码进行验证结果判断后回调此方法", "SubTitle": "通过拖动滑块进行人机识别", "Title": "Captchas 滑块验证码" }, @@ -1186,7 +1176,6 @@ "Divider1": "双向绑定显示标签", "Divider2": "双向绑定不显示标签", "Divider3": "自定义 DisplayText", - "Event1": "级联选择选项改变时触发此事件", "item1": "北京", "item1_child1": "Brunswick", "item1_child1_child": "so-and-so street", @@ -1300,7 +1289,6 @@ "PieNormalTitle": "Pie 图" }, "BootstrapBlazor.Server.Components.Samples.CheckboxLists": { - "AttributeOnMaxSelectedCountExceed": "选项到达最大值后回调方法", "CheckboxListGenericIntro": "通过 CheckboxListGeneric 组件和 SelectedItem<TValue> 开启泛型支持", "CheckboxListGenericTitle": "泛型支持", "CheckboxListsTip": "控件用于创建多选的复选框组", @@ -1311,7 +1299,6 @@ "EnumIntro": "绑定值为枚举", "EnumTip": "当 CheckboxList 绑定一个枚举集合时,Items 不需要指定,Items 会被自动设置成枚举里面所有的值,如果需要绑定部分值时,请自行提供枚举集合 Items", "EnumTitle": "双向绑定枚举", - "Event1": "复选框状态改变时回调此方法", "Foo": "张三,李四", "Header": "共", "IsButtonIntro": "设置 IsButton=\"true\",将复选框样式改为按钮样式", @@ -1361,13 +1348,11 @@ "ItemTemplateTitle": "项目模板", "NormalIntro": "单独使用可以表示两种状态之间的切换,列头或者表头使用时可以表示三种状态之间的切换。组件支持泛型数据绑定,通过 TValue 设置绑定数据类型,通过 State 设置组件状态", "NormalTitle": "基础用法", - "OnBeforeStateChanged": "选择框状态改变前回调此方法", "OnBeforeStateChangedIntro": "通过设置 OnBeforeStateChanged 回调方法,可取消选中逻辑", "OnBeforeStateChangedSwalContent": "是否更改选中状态", "OnBeforeStateChangedSwalTitle": "弹窗确认", "OnBeforeStateChangedText": "弹窗确认", "OnBeforeStateChangedTitle": "选中前回调方法", - "OnStateChanged": "选择框状态改变时回调此方法", "OnStateChangedIntro": "绑定组件内变量,数据自动同步,绑定数据类型为 boolean 类型时自动翻转值", "OnStateChangedTitle": "双向绑定 boolean 数据", "ShowAfterLabelDescription": "设置 DisplayText 属性,或者通过双向绑定均可以显示文本信息", @@ -1375,7 +1360,6 @@ "ShowAfterLabelTitle": "Label 文字", "ShowLabelIntro": "通过设置 Color 属性改变组件背景色", "ShowLabelTitle": "颜色", - "StateChanged": "State 状态改变回调方法", "StatusText1": "选中", "StatusText2": "未选", "StatusText3": "不确定", @@ -1446,9 +1430,6 @@ "Title": "获取客户端连接信息" }, "BootstrapBlazor.Server.Components.Samples.Clipboards": { - "ClipboardCopyMethod": "拷贝文本到剪切板方法", - "ClipboardGetMethod": "读取剪切板内容方法", - "ClipboardGetTextMethod": "读取剪切板文本内容方法", "ClipboardIntro": "剪切板服务!请注意,只能在 HTTPS 安全连接下运行,或者在本地 localhost 开发环境中使用", "ClipboardTitle": "ClipboardService" }, @@ -1612,8 +1593,6 @@ "DisableToday": "禁用今天", "DisableWeekend": "禁用周末", "DisplayText": "选择时间", - "Event1": "确认按钮回调委托", - "Event2": "组件值改变时回调委托供双向绑定使用", "Feature": "功能体验区", "FeatureFestivalIntro": "节日功能由组件库内置服务 ICalendarFestivals 提供,内置默认实现提供了 12 个公历节日与 7 个农历节日,可以通过自定义节日服务进行扩展,详细功能介绍请参阅 节日服务 文档 [传送门]", "FeatureIntro": "假日功能依赖组件包 BootstrapBlazor.Holiday [传送门]", @@ -1634,7 +1613,6 @@ "NullValueIntro": "多用于条件选择", "NullValueTip": "绑定值为可为空类型 DateTime? 时自动出现 清空 按钮", "NullValueTitle": "允许空时间", - "OnGetDisabledDaysCallbackEvent": "获得自定义禁用日期回调方法", "ShowIconIntro": "通过设置 ShowIcon=\"false\" 不显示组件图标节约空间", "ShowIconTitle": "是否显示组件图标", "ShowLabelIntro": "作为表单组件时,显示组件前方标签", @@ -2009,14 +1987,6 @@ "Description": "用于拖拽使用", "EventIntro": "当拖入数量超限时OnItemDropRejectedByMaxItemLimit,当拖拽被禁止时OnItemDropRejected,返回底下的ItemOnReplacedItemDrop,返回放下的ItemOnItemDrop", "EventTitle": "各种事件", - "M1": "是否运行拖放", - "M2": "节点是否允许被拖拽", - "M3": "复制一个新的 Item 到目标位置", - "M4": "针对 Item 添加特殊的 css class", - "M5": "Item 释放时的事件", - "M6": "Item 释放被拒绝时的事件", - "M7": "当 Item 在另一个 Item 上,不是空白处被释放时的事件", - "M8": "Item 因为 Dropzone 内最大数量超限被拒绝时的事件", "NormalIntro": "简单拖拽", "NormalTitle": "基本用法", "Title": "DragDrop 拖拽" @@ -2090,9 +2060,6 @@ "DropdownItemsTemplateTitle": "下拉框模板", "DropdownItemTemplateIntro": "通过设置 ItemTemplate 可以自定义下拉项显示内容,本例中通过自定义模板使用 Tooltip 组件增加鼠标悬浮是显示提示功能", "DropdownItemTemplateTitle": "下拉项模板", - "EventDesc1": "点击按钮时触发此事件", - "EventDesc2": "点击按钮时触发此事件并且不刷新当前组件,用于提高性能时使用", - "EventOnSelectedItemChanged": "下拉框值发生改变时触发", "FixedButtonTextIntro": "通过设置 FixedButtonText 来设置固定按钮的初始文字", "FixedButtonTextTitle": "设置固定按钮文字", "IsAsyncIntro": "通过设置 IsAsync 属性按钮是否为 异步请求按钮,默认为 false注意 需要设置 ShowSplit=\"true\" 时才生效", @@ -2779,17 +2746,13 @@ "IsDisabledTitle": "禁用" }, "BootstrapBlazor.Server.Components.Samples.JSRuntimeExtensions": { - "EvalAttr": "调用 Eval 方法", "EvalIntro": "通过 Eval 函数,在当前作用域内动态运行 JavaScript 代码。", "EvalTitle": "Eval", - "FunctionAttr": "调用 Function 方法", "FunctionIntro": "通过 Function 函数,在全局作用域内动态运行 JavaScript 代码。", "FunctionTitle": "Function", - "IsMobileAttr": "判断当前设备是否为移动设备", "IsMobileIntro": "通过正则表达式判断 userAgent,表示当前设备是否为移动设备", "IsMobileTitle": "IsMobile", "JSTips": "使用前,先按照以下代码导入模块。", - "OpenUrlAttr": "在特定窗口打开连接", "OpenUrlIntro": "在特定窗口打开连接", "OpenUrlTips": "默认为:", "OpenUrlTitle": "OpenUrl" @@ -2994,8 +2957,7 @@ "ListViewsTitle": "ListView 列表视图", "PaginationIntro": "设置 Pageable 显示分页组件", "PaginationTitle": "分页显示", - "ProductListText": "产品列表", - "QueryAsync": "手工查询数据方法" + "ProductListText": "产品列表" }, "BootstrapBlazor.Server.Components.Samples.Live2DDisplays": { "Live2DDisplayDescription": "基于 pixi-live2d-display 的 Live2D 插件,支持所有版本的 Live2D 模型。", @@ -3342,8 +3304,6 @@ "MultiSelectSearchIntro": "通过设置 ShowSearch 值开启搜索功能", "MultiSelectSearchLog": "搜索文字", "MultiSelectSearchTitle": "搜索功能", - "MultiSelectsEvent_OnSearchTextChanged": "搜索文本发生变化时回调此方法", - "MultiSelectsEvent_OnSelectedItemsChanged": "下拉框选项改变时触发此事件", "MultiSelectsTitle": "MultiSelect 多项选择器", "MultiSelectVeryLongTextDisplayText": "超长文字", "MultiSelectVeryLongTextIntro": "候选项文字特别长", @@ -3659,7 +3619,6 @@ "RadiosLog3": "组件 Value 值:", "RadiosNormalIntro": "由于选项默认可见,不宜过多,若选项过多,建议使用 Select 选择器", "RadiosNormalTitle": "基础用法", - "RadiosOnSelectedChangedEvent": "复选框状态改变时回调此方法", "RadiosTitle": "Radio 单选框", "RadiosVerticalIntro": "通过设置 IsVertical 使组件内部竖向排列", "RadiosVerticalTitle": "竖向排列" @@ -3669,7 +3628,6 @@ "RatesDescription": "评分组件", "RatesDisableIntro": "通过设置 IsDisable 属性值禁用组件", "RatesDisableTitle": "禁用", - "RatesEvent1": "值改变时回调委托", "RatesGrin": "惊喜", "RatesIconIntro": "通过设置 ItemTemplate 模板,配合自定义样式 custom-rate实现复杂功能", "RatesIconTitle": "模板", @@ -3792,7 +3750,7 @@ "RowSpanTips5": "行显示 2 个,第一个组件 ColSpan 设置为 3", "RowSpanTips6": "行显示一个组件", "RowSpanTitle": "跨列功能", - "RowsTitle": "Row布局组件" + "RowsTitle": "Row 布局组件" }, "BootstrapBlazor.Server.Components.Samples.Scrolls": { "ScrollDescription": "给高度或者宽度超标的组件增加滚动条", @@ -3957,9 +3915,6 @@ "SelectsNullableDescription": "选中第一个选项时,绑定值 SelectedIntItemnull", "SelectsNullableIntro": "Select 组件绑定 int? 类型示例", "SelectsNullableTitle": "绑定可为空类型", - "SelectsOnBeforeSelectedItemChange": "下拉框选项改变前触发此事件", - "SelectsOnInputChangedCallback": "编辑模式下输入文本转换为对应 Value 回调方法", - "SelectsOnSelectedItemChanged": "下拉框选项改变时触发此事件", "SelectsOption1": "请选择 ...", "SelectsOption2": "北京", "SelectsOption3": "上海", @@ -4093,8 +4048,7 @@ "SlidersNormalTitle": "基础用法", "SlidersRangeIntro": "通过设置绑定值标签 RangeAttribute 自动生成 min max", "SlidersRangeTitle": "Range 标签", - "SlidersTitle": "Slider 滑块", - "SlidersValueChanged": "ValueChanged 回调方法" + "SlidersTitle": "Slider 滑块" }, "BootstrapBlazor.Server.Components.Samples.SmilesDrawers": { "SmilesDrawerDescription": "SmilesDrawer 是一个开源的化学信息学工具包,用于分子建模和化学信息学", @@ -4432,7 +4386,6 @@ "SwitchesDescription": "提供最普通的开关应用", "SwitchesDisableIntro": "通过设置 IsDisabled 属性控制组件不可用状态", "SwitchesDisableTitle": "禁用状态", - "SwitchesEventValueChanged": "获取选择改变的值", "SwitchesInnerTextDescription": "通过设置 OnInnerText OffInnerText 属性更改内置文字,默认情况下建议使用一个汉字,可自定义组件宽度来增加内置文字数量", "SwitchesInnerTextIntro": "通过设置 ShowInnerText 属性控制组件显示内置文字", "SwitchesInnerTextLabelText1": "默认文字:", @@ -4892,11 +4845,7 @@ "TablesFilterDesc": "筛选可快速查找到自己想看的数据;排序可快速查找或对比数据。", "TablesFilterDescLi1": "对某一列数据进行筛选,通过指定列的 Filterable 属性来指定需要筛选的列", "TablesFilterDescLi2": "对某一列数据进行排序,通过指定列的 Sortable 属性来指定需要排序的列,通过多次点击更改排序规则", - "TablesFilterTemplateDescription": "

      FilterTemplate 类型为 RenderFragment 其值为自定义组件,组件必须继承 FilterBase 本例中最后一列 数量列 通过筛选模板使用自定义组件 CustomerFilter [传送门] CustomerFilter 组件源码

      注意事项:

      • 自定义过滤组件使用 FilterProvider 包裹,FilterProvider必须在 FilterTemplate 节点下
      • 通过 FilterProvider 组件的参数可微调过滤器;例如通过设置 ShowMoreButton 控制是否显示 + - 符号
      • v9.6.2 版本前,使用 OnFilterValueChanged 触发过滤回调,重构后使用 OnFilterAsync 触发过滤回调方法
      • ", - "CustomerFilterItem1": "全部", - "CustomerFilterItem2": "大于 10", - "CustomerFilterItem3": "大于 50", - "CustomerFilterItem4": "大于 80" + "TablesFilterTemplateDescription": "

        FilterTemplate 类型为 RenderFragment 其值为自定义组件,组件必须继承 FilterBase 本例中最后一列 数量列 通过筛选模板使用自定义组件 CustomerFilter [传送门] CustomerFilter 组件源码

        注意事项:

        • 自定义过滤组件使用 FilterProvider 包裹,FilterProvider必须在 FilterTemplate 节点下
        • 通过 FilterProvider 组件的参数可微调过滤器;例如通过设置 ShowMoreButton 控制是否显示 + - 符号
        • v9.6.2 版本前,使用 OnFilterValueChanged 触发过滤回调,重构后使用 OnFilterAsync 触发过滤回调方法
        • " }, "BootstrapBlazor.Server.Components.Samples.Table.TablesFixedColumn": { "TablesFixedColHeaderDescription": "本例中设置 Name Education Count Complete 前两列和最后一列为固定列,中间各列进行水平滚动,本例中设置 AllowResize=\"true\" 固定列也可以调整宽度", @@ -5195,7 +5144,6 @@ "BlockHeaderTemplateDesc": "在 HeaderTemplate 中使用 Badge 设置挂件", "BlockHeaderTemplateHeaderText": "待办事宜", "DividerText": "Tab 分割线", - "MethodTitle": "Method 方法", "RemoveButtonText": "移除", "ShowTabInHeaderDesc": "Layout 组件中开启多标签功能后,可以通过设置 ShowTabInHeader=\"true\"Tab 标签头渲染到 Layout Header 模板中,效果可以通过 项目模板 新建工程查看", "TabItem1Content": "我是用户管理", @@ -5214,15 +5162,6 @@ "TabItem7Text": "定时任务管理", "TabItem8Text": "计数组件", "TabItem9Text": "天气预报", - "TabMethod1AddTab": "添加 TabItem 到 Tab 中,可指定新增Tab的位置", - "TabMethod2RemoveTab": "移除 TabItem", - "TabMethod3ActiveTab": "设置指定 TabItem 为激活状态", - "TabMethod4ClickPrevTab": "切换到上一个标签方法", - "TabMethod5ClickNextTab": "切换到下一个标签方法", - "TabMethod6CloseCurrentTab": "关闭当前标签页方法", - "TabMethod7CloseOtherTabs": "关闭其他标签页方法", - "TabMethod8CloseAllTabs": "关闭所有标签页方法", - "TabMethod9GetActiveTab": "获得当前标签页方法", "TabsAddTabItemIntro": "通过调用组件 api 动态添加/删除 TabItem", "TabsAddTabItemTitle": "自定义增加标签页触发器", "TabsAppDescription": "通过 添加 删除 按钮动态调整 TabItem 数量,使其超出容器数量查看,左右移动效果;用户管理 设置为不可关闭;功能按钮无法关闭这个标签页。组件默认是循环切换标签页的,可以通过 IsLoopSwitchTabItem=\"false\" 关闭这个功能", @@ -5305,7 +5244,6 @@ "TagsIconTitle": "带 Icon", "TagsNormalIntro": "页面中的非浮层元素,不会自动消失。", "TagsNormalTitle": "基础用法", - "TagsOnDismiss": "关闭标签回调方法", "TagsSubTitle": "用于标记和选择。", "TagsTitle": "Tag 标签" }, @@ -5500,8 +5438,7 @@ "TogglesOffText": "关闭", "TogglesOnText": "开启", "TogglesSubTitle": "提供最普通的开关应用,值为 true false", - "TogglesTitle": "Toggle 开关", - "ValueChanged": "获取选择改变的值" + "TogglesTitle": "Toggle 开关" }, "BootstrapBlazor.Server.Components.Samples.Toolbars": { "NormalTitle": "基本用法", @@ -5542,8 +5479,6 @@ "Data": "数据", "LeftButtonText": "到左边", "LeftPanelText": "左侧列表", - "OnSelectedItemsChanged": "组件绑定数据项集合选项变化时回调方法", - "OnSetItemClass": "设置 Item 样式回调方法", "PlaceHolder": "请输入", "RightButtonText": "到右边", "RightPanelText": "右侧列表", @@ -5801,8 +5736,6 @@ "OnValidSubmitLog": "OnValidSubmit 回调委托: 验证通过", "OnValidSubmitStartingLog": "OnValidSubmit 回调委托: Starting ...", "ResetButtonText": "重置组件", - "SetError": "设置验证失败方法", - "Validate": "表单认证方法", "ValidateButtonText": "保存", "ValidateFormComplexValidationDescription": "本示例中第二个绑定的是一个超级复杂类型 ComplexModel.Dummy.Dummy2.Name 清空值后,点击 提交表单 会对数据进行验证。第二个文本框验证合规后,通过调用 SetError 再次显示错误提示", "ValidateFormComplexValidationIntro": "支持任意复杂类型的绑定与验证", @@ -6000,21 +5933,5 @@ "NullItemText": "未设置", "ReadonlyColumn": "只读列", "True": "通过" - }, - "BootstrapBlazor.Server.Components.Components.BlazorReconnector": { - "Title": "Reconnector 组件", - "ReconnectingTitle": "正在尝试重新连接服务器", - "ReconnectingDescription": "服务器正在更新新版本,稍等一会儿即可提供服务,或者 F12 打开 Developer tools 查看 控制台 是否有错误输出,请扫描左侧二维码加群与管理员联系", - "ReconnectButton": "重新连接", - "ReconnectFailedTitle": "与服务器连接失败", - "ReconnectFailedDescription": "请确认网络是否正常,或者 F12 打开 Developer tools 查看 控制台 是否有错误输出,请扫描左侧二维码加群与管理员联系", - "ReloadButton": "重新加载", - "ReconnectRejectedTitle": "服务器拒绝连接", - "ReconnectRejectedDescription": "所有的连接尝试都被拒绝了,这很有可能是由于网络问题或者服务器问题引起的,请扫描左侧二维码加群与管理员联系", - "UILibraryTitle": "Bootstrap Blazor UI 组件库", - "UILibraryDescription1": "一套基于 Bootstrap 样式的企业级 Blazor UI 组件库,支持 Server 与 WebAssembly", - "UILibraryDescription2": "适配移动端支持各种主流浏览器以及移动端,适配 ABP,同时支持 {0}", - "TemplateLink": "项目模板", - "TemplateText": "已提供项目模板方便快速上手" } } diff --git a/test/UnitTest.Localization/JsonTest.cs b/test/UnitTest.Localization/JsonTest.cs index 7498733b1ec..af34db77d80 100644 --- a/test/UnitTest.Localization/JsonTest.cs +++ b/test/UnitTest.Localization/JsonTest.cs @@ -120,6 +120,16 @@ private static bool FindLocalizerByKey(string fileName, string key) return true; } + if (content.Contains($"Localizer[\"{key}\",")) + { + return true; + } + + if (content.Contains($"Localizer[nameof({key}),")) + { + return true; + } + return false; } From f825cf9a410b012083ae5ba987824082717e9c9a Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 12:25:45 +0800 Subject: [PATCH 5/9] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Components/FormInlineSwitch.razor.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs index fd4ac9c3b6f..b5c4dc4eb7c 100644 --- a/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -53,10 +53,12 @@ private RowType FormRowType } /// - /// OnInitialized 方法 + /// /// protected override void OnInitialized() { + base.OnInitialized(); + Items = Enum.GetNames().Select(i => new SelectedItem(i, LocalizerRows[i])); } } From 4621a53e8a45eedec5402e822a19512441cdb94a Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 12:45:23 +0800 Subject: [PATCH 6/9] =?UTF-8?q?doc:=20=E8=A7=84=E8=8C=83=E5=8C=96=20Locali?= =?UTF-8?q?zer=20=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/DemoHobbyTemplate.razor | 6 ++-- .../Components/FormInlineSwitch.razor.cs | 4 +-- .../Components/Samples/AutoFills.razor.cs | 16 +++++----- .../Components/Samples/CheckboxLists.razor.cs | 12 +++---- .../Components/Samples/ContextMenus.razor | 4 +-- .../Components/Samples/ContextMenus.razor.cs | 6 ++-- .../Components/Samples/Dialogs.razor.cs | 6 ++-- .../Samples/DockViews/BaseDockView.cs | 14 ++++---- .../Samples/DockViews2/BaseDockView.cs | 14 ++++---- .../Components/Samples/Dom2Images.razor.cs | 6 ++-- .../Components/Samples/Html2Images.razor.cs | 6 ++-- .../Components/Samples/Html2Pdfs.razor.cs | 6 ++-- .../Components/Samples/InputGroups.razor | 10 +++--- .../Components/Samples/InputGroups.razor.cs | 6 ++-- .../Components/Samples/Labels.razor | 32 +++++++++---------- .../Components/Samples/Labels.razor.cs | 10 +++--- .../Components/Samples/Layouts.razor | 2 +- .../Components/Samples/Layouts.razor.cs | 6 ++-- .../Components/Samples/ListGroups.razor.cs | 6 ++-- .../Components/Samples/MultiSelects.razor.cs | 6 ++-- .../Components/Samples/Radios.razor | 2 +- .../Components/Samples/Radios.razor.cs | 10 +++--- .../Components/Samples/Rows.razor | 2 +- .../Components/Samples/Rows.razor.cs | 8 ++--- .../Components/Samples/Searches.razor | 2 +- .../Components/Samples/Searches.razor.cs | 8 ++--- .../Samples/SelectGenerics.razor.cs | 4 +-- .../Components/Samples/SelectTables.razor.cs | 10 +++--- .../Components/Samples/Selects.razor.cs | 4 +-- .../Components/Samples/SlideButtons.razor.cs | 6 ++-- .../Samples/Table/TablesAttribute.razor | 4 +-- .../Samples/Table/TablesAutoRefresh.razor | 4 +-- .../Samples/Table/TablesAutoRefresh.razor.cs | 8 ++--- .../Samples/Table/TablesDialog.razor | 4 +-- .../Samples/Table/TablesDialog.razor.cs | 6 ++-- .../Samples/Table/TablesDynamic.razor | 4 +-- .../Samples/Table/TablesDynamic.razor.cs | 18 +++++------ .../Samples/Table/TablesDynamicExcel.razor | 4 +-- .../Samples/Table/TablesDynamicExcel.razor.cs | 8 ++--- .../Components/Samples/Table/TablesEdit.razor | 4 +-- .../Samples/Table/TablesEdit.razor.cs | 10 +++--- .../Samples/Table/TablesExcel.razor | 4 +-- .../Samples/Table/TablesExcel.razor.cs | 4 +-- .../Samples/Table/TablesExport.razor | 4 +-- .../Samples/Table/TablesExport.razor.cs | 4 +-- .../Samples/Table/TablesFixedColumn.razor | 4 +-- .../Samples/Table/TablesFixedColumn.razor.cs | 4 +-- .../Samples/Table/TablesFooter.razor | 4 +-- .../Samples/Table/TablesFooter.razor.cs | 4 +-- .../Samples/Table/TablesHeader.razor | 4 +-- .../Samples/Table/TablesHeader.razor.cs | 4 +-- .../Samples/Table/TablesLoading.razor | 4 +-- .../Samples/Table/TablesLoading.razor.cs | 6 ++-- .../Samples/Table/TablesLookup.razor | 4 +-- .../Samples/Table/TablesLookup.razor.cs | 4 +-- .../Samples/Table/TablesPages.razor | 4 +-- .../Samples/Table/TablesPages.razor.cs | 4 +-- .../Samples/Table/TablesSelection.razor | 4 +-- .../Samples/Table/TablesSelection.razor.cs | 6 ++-- .../Samples/Table/TablesToolbar.razor | 4 +-- .../Samples/Table/TablesToolbar.razor.cs | 4 +-- .../Samples/Table/TablesTracking.razor | 4 +-- .../Samples/Table/TablesTracking.razor.cs | 4 +-- .../Components/Samples/Table/TablesTree.razor | 4 +-- .../Samples/Table/TablesTree.razor.cs | 16 +++++----- .../Samples/Table/TablesVirtualization.razor | 4 +-- .../Table/TablesVirtualization.razor.cs | 4 +-- .../Components/Samples/Table/TablesWrap.razor | 4 +-- .../Samples/Table/TablesWrap.razor.cs | 6 ++-- .../Components/Samples/TreeViews.razor | 2 +- .../Components/Samples/TreeViews.razor.cs | 2 +- .../Components/Samples/ValidateForms.razor | 2 +- .../Components/Samples/ValidateForms.razor.cs | 8 ++--- .../Components/Samples/WinBoxes.razor | 2 +- 74 files changed, 227 insertions(+), 227 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Components/DemoHobbyTemplate.razor b/src/BootstrapBlazor.Server/Components/Components/DemoHobbyTemplate.razor index 4644691af67..7ed379bf451 100644 --- a/src/BootstrapBlazor.Server/Components/Components/DemoHobbyTemplate.razor +++ b/src/BootstrapBlazor.Server/Components/Components/DemoHobbyTemplate.razor @@ -1,5 +1,5 @@ -@using BootstrapBlazor.Server.Components.Samples.Table -@inject IStringLocalizer LocalizerFoo +@using BootstrapBlazor.Server.Components.Samples.Table +@inject IStringLocalizer FooLocalizer
          @@ -17,6 +17,6 @@ ///
protected override void OnInitialized() { - Hobbies = Foo.GenerateHobbies(LocalizerFoo); + Hobbies = Foo.GenerateHobbies(FooLocalizer); } } diff --git a/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs index b5c4dc4eb7c..28bd6d81f4a 100644 --- a/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs @@ -20,7 +20,7 @@ public partial class FormInlineSwitch [Inject] [NotNull] - private IStringLocalizer? LocalizerRows { get; set; } + private IStringLocalizer? RowsLocalizer { get; set; } /// /// @@ -59,6 +59,6 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Enum.GetNames().Select(i => new SelectedItem(i, LocalizerRows[i])); + Items = Enum.GetNames().Select(i => new SelectedItem(i, RowsLocalizer[i])); } } diff --git a/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs index ef01732b3ce..e8c64be327a 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -44,7 +44,7 @@ partial class AutoFills [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } private bool _isClearable = true; @@ -53,19 +53,19 @@ protected override void OnInitialized() { base.OnInitialized(); - Items1 = Foo.GenerateFoo(LocalizerFoo); + Items1 = Foo.GenerateFoo(FooLocalizer); Model1 = Items1.First(); - Items2 = Foo.GenerateFoo(LocalizerFoo); + Items2 = Foo.GenerateFoo(FooLocalizer); Model2 = Items2.First(); - Items3 = Foo.GenerateFoo(LocalizerFoo); + Items3 = Foo.GenerateFoo(FooLocalizer); Model3 = Items3.First(); - Items4 = Foo.GenerateFoo(LocalizerFoo); + Items4 = Foo.GenerateFoo(FooLocalizer); Model4 = Items3.First(); - Items5 = Foo.GenerateFoo(LocalizerFoo); + Items5 = Foo.GenerateFoo(FooLocalizer); Model5 = Items3.First(); } @@ -84,7 +84,7 @@ private Task> OnCustomVirtulizeFilter(string searchText) private async Task> OnQueryAsync(VirtualizeQueryOption option) { await Task.Delay(200); - var items = Foo.GenerateFoo(LocalizerFoo); + var items = Foo.GenerateFoo(FooLocalizer); if (!string.IsNullOrEmpty(option.SearchText)) { items = [.. items.Where(i => i.Name!.Contains(option.SearchText, StringComparison.OrdinalIgnoreCase))]; diff --git a/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs index 2b3173ede58..d86612bed91 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor.cs @@ -95,8 +95,8 @@ protected override void OnInitialized() }; Dummy = new Foo() { Name = Localizer["Foo"] }; - Model = Foo.Generate(LocalizerFoo); - FooItems = Foo.GenerateHobbies(LocalizerFoo); + Model = Foo.Generate(FooLocalizer); + FooItems = Foo.GenerateHobbies(FooLocalizer); } /// @@ -109,9 +109,9 @@ protected override async Task OnInitializedAsync() GenericItems = new List>() { - new() { Text = Localizer["item1"], Value = new Foo() { Name = LocalizerFoo["Foo.Name", "001"] } }, - new() { Text = Localizer["item2"], Value = new Foo() { Name = LocalizerFoo["Foo.Name", "002"] } }, - new() { Text = Localizer["item3"], Value = new Foo() { Name = LocalizerFoo["Foo.Name", "003"] } }, + new() { Text = Localizer["item1"], Value = new Foo() { Name = FooLocalizer["Foo.Name", "001"] } }, + new() { Text = Localizer["item2"], Value = new Foo() { Name = FooLocalizer["Foo.Name", "002"] } }, + new() { Text = Localizer["item3"], Value = new Foo() { Name = FooLocalizer["Foo.Name", "003"] } }, }; } @@ -155,7 +155,7 @@ private Task OnSelectedChanged(IEnumerable items, string value) [Inject] [NotNull] - IStringLocalizer? LocalizerFoo { get; set; } + IStringLocalizer? FooLocalizer { get; set; } [Inject, NotNull] private ToastService? ToastService { get; set; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor b/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor index 4af42e3448f..8caf2bec67d 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor @@ -1,6 +1,6 @@ -@page "/context-menu" +@page "/context-menu" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["ContextMenuTitle"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs index 72e358e2939..2c3bbd5325b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -37,8 +37,8 @@ private static Task OnPaste(ContextMenuItem item, object value) ///
protected override void OnInitialized() { - Foo = Foo.Generate(LocalizerFoo); - Items = Foo.GenerateFoo(LocalizerFoo); + Foo = Foo.Generate(FooLocalizer); + Items = Foo.GenerateFoo(FooLocalizer); } TreeFoo? SelectModel = default; diff --git a/src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs index 75e645b5033..c83f041e16a 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Dialogs.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -203,7 +203,7 @@ private async Task OnSearchDialogClick() [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } /// /// Foo 类为Demo测试用,如有需要请自行下载源码查阅 @@ -212,7 +212,7 @@ private async Task OnSearchDialogClick() /// private async Task OnSaveDialogClick() { - var foo = Foo.Generate(LocalizerFoo); + var foo = Foo.Generate(FooLocalizer); await DialogService.ShowSaveDialog("Save", () => { // 此处可以访问 foo 实例进行入库操作等 diff --git a/src/BootstrapBlazor.Server/Components/Samples/DockViews/BaseDockView.cs b/src/BootstrapBlazor.Server/Components/Samples/DockViews/BaseDockView.cs index f7d6528e4f5..e2a23e88c25 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/DockViews/BaseDockView.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/DockViews/BaseDockView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -19,7 +19,7 @@ public abstract class BaseDockView : ComponentBase ///
[Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } /// /// @@ -57,16 +57,16 @@ public abstract class BaseDockView : ComponentBase /// protected override void OnInitialized() { - Items = Foo.GenerateFoo(LocalizerFoo, 50); + Items = Foo.GenerateFoo(FooLocalizer, 50); // 模拟数据从数据库中获得 - TreeItems = TreeFoo.GenerateFoos(LocalizerFoo, 50); + TreeItems = TreeFoo.GenerateFoos(FooLocalizer, 50); // 插入 Id 为 1 的子项 - TreeItems.AddRange(TreeFoo.GenerateFoos(LocalizerFoo, 2, 1, 100)); + TreeItems.AddRange(TreeFoo.GenerateFoos(FooLocalizer, 2, 1, 100)); // 插入 Id 为 101 的子项 - TreeItems.AddRange(TreeFoo.GenerateFoos(LocalizerFoo, 3, 101, 1010)); + TreeItems.AddRange(TreeFoo.GenerateFoos(FooLocalizer, 3, 101, 1010)); DataTableDynamicContext = DataTableDynamicService.CreateContext(); } @@ -124,7 +124,7 @@ protected Task>> OnTreeExpand(TreeFoo foo) => // 模拟从数据库中查询 await Task.Delay(1000); entry.SlidingExpiration = TimeSpan.FromMinutes(10); - return TreeFoo.GenerateFoos(LocalizerFoo, 2, foo.Id, foo.Id * 100).Select(i => new TableTreeNode(i)); + return TreeFoo.GenerateFoos(FooLocalizer, 2, foo.Id, foo.Id * 100).Select(i => new TableTreeNode(i)); }); /// diff --git a/src/BootstrapBlazor.Server/Components/Samples/DockViews2/BaseDockView.cs b/src/BootstrapBlazor.Server/Components/Samples/DockViews2/BaseDockView.cs index 9fd84cc3e72..455d1e171ce 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/DockViews2/BaseDockView.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/DockViews2/BaseDockView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -16,7 +16,7 @@ public abstract class BaseDockView : ComponentBase [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } [Inject] [NotNull] @@ -53,16 +53,16 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo, 50); + Items = Foo.GenerateFoo(FooLocalizer, 50); // 模拟数据从数据库中获得 - TreeItems = TreeFoo.GenerateFoos(LocalizerFoo, 50); + TreeItems = TreeFoo.GenerateFoos(FooLocalizer, 50); // 插入 Id 为 1 的子项 - TreeItems.AddRange(TreeFoo.GenerateFoos(LocalizerFoo, 2, 1, 100)); + TreeItems.AddRange(TreeFoo.GenerateFoos(FooLocalizer, 2, 1, 100)); // 插入 Id 为 101 的子项 - TreeItems.AddRange(TreeFoo.GenerateFoos(LocalizerFoo, 3, 101, 1010)); + TreeItems.AddRange(TreeFoo.GenerateFoos(FooLocalizer, 3, 101, 1010)); DataTableDynamicContext = DataTableDynamicService.CreateContext(); } @@ -120,7 +120,7 @@ protected Task>> OnTreeExpand(TreeFoo foo) => // 模拟从数据库中查询 await Task.Delay(1000); entry.SlidingExpiration = TimeSpan.FromMinutes(10); - return TreeFoo.GenerateFoos(LocalizerFoo, 2, foo.Id, foo.Id * 100).Select(i => new TableTreeNode(i)); + return TreeFoo.GenerateFoos(FooLocalizer, 2, foo.Id, foo.Id * 100).Select(i => new TableTreeNode(i)); }); /// diff --git a/src/BootstrapBlazor.Server/Components/Samples/Dom2Images.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Dom2Images.razor.cs index 733cf684830..b43c1da9d1b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Dom2Images.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Dom2Images.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -12,7 +12,7 @@ public partial class Dom2Images { [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } [Inject] [NotNull] @@ -34,7 +34,7 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); } private async Task OnGetUrlAsync() diff --git a/src/BootstrapBlazor.Server/Components/Samples/Html2Images.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Html2Images.razor.cs index f50a2aaa437..0954768766f 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Html2Images.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Html2Images.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -12,7 +12,7 @@ public partial class Html2Images { [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } [Inject] [NotNull] @@ -34,7 +34,7 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); } private async Task OnExportAsync() diff --git a/src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor.cs index 1fe385f9465..bbc9839b9d4 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -34,7 +34,7 @@ public partial class Html2Pdfs [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } [Inject] [NotNull] @@ -59,7 +59,7 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); _exportIcon = IconTheme.GetIconByKey(ComponentIcons.TableExportPdfIcon); } diff --git a/src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor b/src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor index 91f84fba87c..da4d0df8abb 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor @@ -1,6 +1,6 @@ @page "/input-group" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject IOptions WebsiteOption

@Localizer["InputGroupsTitle"]

@@ -157,7 +157,7 @@
- +
@@ -168,13 +168,13 @@
- +
- +
@@ -219,7 +219,7 @@
- +
diff --git a/src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor.cs index 6f615df2348..ed5bb259287 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/InputGroups.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -44,8 +44,8 @@ public partial class InputGroups ///
protected override void OnInitialized() { - AufoFillItems = Foo.GenerateFoo(LocalizerFoo); - Model = Foo.Generate(LocalizerFoo); + AufoFillItems = Foo.GenerateFoo(FooLocalizer); + Model = Foo.Generate(FooLocalizer); } private string StringAt { get; set; } = "@"; diff --git a/src/BootstrapBlazor.Server/Components/Samples/Labels.razor b/src/BootstrapBlazor.Server/Components/Samples/Labels.razor index 5db5ab04b85..34953033396 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Labels.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Labels.razor @@ -1,8 +1,8 @@ -@page "/label" +@page "/label" @layout ComponentLayout @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo -@inject IStringLocalizer LocalizerForm +@inject IStringLocalizer FooLocalizer +@inject IStringLocalizer FormLocalizer

@Localizer["LabelsTitle"]

@@ -41,7 +41,7 @@
- +
@@ -60,7 +60,7 @@
- +
@@ -77,7 +77,7 @@ - + @@ -87,7 +87,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -121,7 +121,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -205,8 +205,8 @@
-

@((MarkupString)LocalizerForm["ValidateFormNormalFormLabelWidth"].Value)

-

@((MarkupString)LocalizerForm["LongDisplayDescription"].Value)

+

@((MarkupString)FormLocalizer["ValidateFormNormalFormLabelWidth"].Value)

+

@((MarkupString)FormLocalizer["LongDisplayDescription"].Value)

:root {
     --bb-row-label-width: 120px;
 }
@@ -215,12 +215,12 @@
- +
- +
@@ -267,7 +267,7 @@
- +
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Labels.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Labels.razor.cs index c3fbd4e05a9..6b1dcd42bb5 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Labels.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Labels.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -29,9 +29,9 @@ protected override void OnInitialized() { base.OnInitialized(); - Dummy1 = Foo.Generate(LocalizerFoo); - Dummy2 = Foo.Generate(LocalizerFoo); - Dummy3 = Foo.Generate(LocalizerFoo); - Dummy4 = Foo.Generate(LocalizerFoo); + Dummy1 = Foo.Generate(FooLocalizer); + Dummy2 = Foo.Generate(FooLocalizer); + Dummy3 = Foo.Generate(FooLocalizer); + Dummy4 = Foo.Generate(FooLocalizer); } } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor b/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor index a3f48a40cbc..5574a8b1e19 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor @@ -1,6 +1,6 @@ @page "/layout" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerMenu +@inject IStringLocalizer MenuLocalizer

@Localizer["LayoutsTitle"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor.cs index 527287a4f8a..abc9c43a595 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -22,7 +22,7 @@ protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); - IconSideMenuItems1 = await MenusDataGenerator.GetIconSideMenuItemsAsync(LocalizerMenu); - IconSideMenuItems2 = await MenusDataGenerator.GetIconSideMenuItemsAsync(LocalizerMenu); + IconSideMenuItems1 = await MenusDataGenerator.GetIconSideMenuItemsAsync(MenuLocalizer); + IconSideMenuItems2 = await MenusDataGenerator.GetIconSideMenuItemsAsync(MenuLocalizer); } } diff --git a/src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor.cs index 9322e94f4aa..f3e2f5726c1 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -15,7 +15,7 @@ public partial class ListGroups [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } [NotNull] private Foo? Value { get; set; } @@ -27,7 +27,7 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); } private static string? GetItemDisplayText(Foo item) => item.Name; diff --git a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs index eecba5f33b2..675580e4d1e 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs @@ -12,7 +12,7 @@ public partial class MultiSelects { [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } /// /// Foo 类为Demo测试用,如有需要请自行下载源码查阅 @@ -193,7 +193,7 @@ protected override void OnInitialized() Items8 = GenerateItems(); TemplateItems = GenerateItems(); EditableItems = GenerateItems(); - FooItems = [.. Foo.GenerateFoo(LocalizerFoo).Select(i => new SelectedItem(i, i.Name!))]; + FooItems = [.. Foo.GenerateFoo(FooLocalizer).Select(i => new SelectedItem(i, i.Name!))]; // 初始化数据 DataSource = @@ -219,7 +219,7 @@ protected override void OnInitialized() LongItems = GenerateDataSource(LongDataSource); Items = GenerateDataSource(DataSource); - Foos = Foo.GenerateFoo(LocalizerFoo); + Foos = Foo.GenerateFoo(FooLocalizer); _virtualItemValue1 = $"{Foos[79].Id}, {Foos[78].Id}"; _virtualItemValue2 = $"{Foos[45].Id}, {Foos[46].Id}"; _virtualItemText1 = $"{Foos[79].Name}, {Foos[78].Name}"; diff --git a/src/BootstrapBlazor.Server/Components/Samples/Radios.razor b/src/BootstrapBlazor.Server/Components/Samples/Radios.razor index 162886ffcce..48cd8fa0331 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Radios.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Radios.razor @@ -1,6 +1,6 @@ @page "/radio" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["RadiosTitle"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs index c2b8b46ae93..11bb464ff3c 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Radios.razor.cs @@ -97,15 +97,15 @@ protected override void OnInitialized() new() { Text = "Item2", Value = "2", Icon = "fa-solid fa-users-gear" } }; - Model = Foo.Generate(LocalizerFoo); - FooItems = Foo.GetCompleteItems(LocalizerFoo); + Model = Foo.Generate(FooLocalizer); + FooItems = Foo.GetCompleteItems(FooLocalizer); - _selectedFoo.Name = LocalizerFoo["Foo.Name", "001"]; + _selectedFoo.Name = FooLocalizer["Foo.Name", "001"]; GenericItems = new List> { new() { Text = Localizer["Item1"], Value = _selectedFoo }, - new() { Text = Localizer["Item2"], Value = new Foo { Id = 2, Name = LocalizerFoo["Foo.Name", "002"] } }, - new() { Text = Localizer["Item3"], Value = new Foo { Id = 3, Name = LocalizerFoo["Foo.Name", "003"] } }, + new() { Text = Localizer["Item2"], Value = new Foo { Id = 2, Name = FooLocalizer["Foo.Name", "002"] } }, + new() { Text = Localizer["Item3"], Value = new Foo { Id = 3, Name = FooLocalizer["Foo.Name", "003"] } }, }; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Rows.razor b/src/BootstrapBlazor.Server/Components/Samples/Rows.razor index fca4530c975..05f1180ecd3 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Rows.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Rows.razor @@ -1,6 +1,6 @@ @page "/row" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["RowsTitle"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Rows.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Rows.razor.cs index 39d14811350..9ad123fdaf8 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Rows.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Rows.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -62,9 +62,9 @@ protected override void OnInitialized() { base.OnInitialized(); - Hobbies1 = Foo.GenerateHobbies(LocalizerFoo); - Hobbies2 = Foo.GenerateHobbies(LocalizerFoo); - Hobbies3 = Foo.GenerateHobbies(LocalizerFoo); + Hobbies1 = Foo.GenerateHobbies(FooLocalizer); + Hobbies2 = Foo.GenerateHobbies(FooLocalizer); + Hobbies3 = Foo.GenerateHobbies(FooLocalizer); } private class RowFoo : Foo diff --git a/src/BootstrapBlazor.Server/Components/Samples/Searches.razor b/src/BootstrapBlazor.Server/Components/Samples/Searches.razor index 1fcbfc0e282..ff829160840 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Searches.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Searches.razor @@ -1,6 +1,6 @@ @page "/search" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject IOptions WebsiteOption

@Localizer["SearchesTitle"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Searches.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Searches.razor.cs index beec7bc48d6..e32dca6bd7a 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Searches.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Searches.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -60,8 +60,8 @@ private async Task> OnSearchFoo(string searchText) return Enumerable.Range(1, 10).Select(i => new Foo() { Id = i, - Name = LocalizerFoo["Foo.Name", $"{i:d4}"], - Address = LocalizerFoo["Foo.Address", $"{Random.Shared.Next(1000, 2000)}"], + Name = FooLocalizer["Foo.Name", $"{i:d4}"], + Address = FooLocalizer["Foo.Address", $"{Random.Shared.Next(1000, 2000)}"], Count = Random.Shared.Next(1, 100) }).ToList(); } @@ -72,7 +72,7 @@ private async Task> OnSearchFoo(string searchText) await Task.Delay(100); return string.IsNullOrEmpty(v) ? Enumerable.Empty() - : Enumerable.Range(1, 10).Select(i => LocalizerFoo["Foo.Name", $"{i:d4}"].Value).ToList(); + : Enumerable.Range(1, 10).Select(i => FooLocalizer["Foo.Name", $"{i:d4}"].Value).ToList(); } private async Task OnClickCamera(SearchContext context) diff --git a/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor.cs index b5ea97d70b2..02a060f4697 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor.cs @@ -39,7 +39,7 @@ public sealed partial class SelectGenerics [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } private bool _showSearch; @@ -58,7 +58,7 @@ protected override void OnInitialized() TimeZoneItems = TimeZoneInfo.GetSystemTimeZones().Select(i => new SelectedItem(i.Id, i.DisplayName)); TimeZoneId = TimeZoneInfo.Local.Id; TimeZoneValue = TimeZoneInfo.Local.BaseUtcOffset; - Foos = Foo.GenerateFoo(LocalizerFoo); + Foos = Foo.GenerateFoo(FooLocalizer); } private async Task>> OnQueryAsync(VirtualizeQueryOption option) diff --git a/src/BootstrapBlazor.Server/Components/Samples/SelectTables.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/SelectTables.razor.cs index 74eec594582..8b3199e0271 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/SelectTables.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/SelectTables.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -12,7 +12,7 @@ public partial class SelectTables { [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } [Inject] [NotNull] @@ -47,8 +47,8 @@ protected override void OnInitialized() { base.OnInitialized(); - _items = Foo.GenerateFoo(LocalizerFoo); - _filterItems = Foo.GenerateFoo(LocalizerFoo); + _items = Foo.GenerateFoo(FooLocalizer); + _filterItems = Foo.GenerateFoo(FooLocalizer); } private Task> OnQueryAsync(QueryPageOptions options) @@ -71,7 +71,7 @@ private Task> OnFilterQueryAsync(QueryPageOptions options) } var count = items.Count(); - if(options.IsPage) + if (options.IsPage) { items = items.Skip((options.PageIndex - 1) * options.PageItems).Take(options.PageItems); } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs index 9a0b6636f76..ceab2e7eb1f 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs @@ -41,7 +41,7 @@ public sealed partial class Selects [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } private bool _showSearch = true; private bool _showPopoverSearch = true; @@ -65,7 +65,7 @@ protected override void OnInitialized() TimeZoneItems = TimeZoneInfo.GetSystemTimeZones().Select(i => new SelectedItem(i.Id, i.DisplayName)); TimeZoneId = TimeZoneInfo.Local.Id; TimeZoneValue = TimeZoneInfo.Local.BaseUtcOffset; - Foos = Foo.GenerateFoo(LocalizerFoo); + Foos = Foo.GenerateFoo(FooLocalizer); } private async Task> OnQueryAsync(VirtualizeQueryOption option) diff --git a/src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor.cs index c64465103df..83db961fb41 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -12,11 +12,11 @@ public partial class SlideButtons { [Inject] [NotNull] - private IStringLocalizer? LocalizerFoo { get; set; } + private IStringLocalizer? FooLocalizer { get; set; } private Placement Placement { get; set; } - private IEnumerable Items => Foo.GenerateFoo(LocalizerFoo).Select(i => new SelectedItem(i.Id.ToString(), i.Name!)); + private IEnumerable Items => Foo.GenerateFoo(FooLocalizer).Select(i => new SelectedItem(i.Id.ToString(), i.Name!)); private Task OnClickPlacement(Placement placement) { diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAttribute.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAttribute.razor index e8881949f64..139687f6960 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAttribute.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAttribute.razor @@ -1,6 +1,6 @@ -@page "/table/attribute" +@page "/table/attribute" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @layout MainLayout

@Localizer["TableAttributeTitle"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor index ffc50599b11..e90c62e98a3 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor @@ -1,8 +1,8 @@ -@page "/table/auto-refresh" +@page "/table/auto-refresh" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableAutoRefresh"]

@Localizer["TablesAutoRefreshDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor.cs index f58086dba09..1a43ee85b36 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesAutoRefresh.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -32,10 +32,10 @@ public partial class TablesAutoRefresh private Task> GenerateFoos(QueryPageOptions options, List foos) { // 设置记录总数 - var foo = Foo.Generate(LocalizerFoo); + var foo = Foo.Generate(FooLocalizer); foo.Id = _id++; - foo.Name = LocalizerFoo["Foo.Name", foo.Id.ToString("D4")]; - foo.Address = LocalizerFoo["Foo.Address", $"{random.Next(1000, 2000)}"]; + foo.Name = FooLocalizer["Foo.Name", foo.Id.ToString("D4")]; + foo.Address = FooLocalizer["Foo.Address", $"{random.Next(1000, 2000)}"]; foos.Insert(0, foo); if (foos.Count > 10) { diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor index b793fa2aa0c..2ddccf23844 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor @@ -1,8 +1,8 @@ -@page "/table/dialog" +@page "/table/dialog" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableDialog"]

@Localizer["TablesDialogDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor.cs index 701141be7b3..a022a382a4a 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDialog.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -45,9 +45,9 @@ protected override void OnInitialized() ProductSelectItems = Enumerable.Range(1, 5).Select(i => new Foo() { Id = i, - Name = LocalizerFoo["Foo.Name", $"{i:d4}"], + Name = FooLocalizer["Foo.Name", $"{i:d4}"], DateTime = DateTime.Now.AddDays(i - 1), - Address = LocalizerFoo["Foo.Address", $"{random.Next(1000, 2000)}"], + Address = FooLocalizer["Foo.Address", $"{random.Next(1000, 2000)}"], Count = random.Next(1, 100), Complete = random.Next(1, 100) > 50, Education = EnumEducation.Primary, diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor index 136f9b7f60b..5cc3c00217f 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor @@ -1,7 +1,7 @@ -@page "/table/dynamic" +@page "/table/dynamic" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["TablesDynamicTitle"] - @NavMenuLocalizer["TableDynamic"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor.cs index e284d952258..9950d0bdd75 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamic.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -51,25 +51,25 @@ private void CreateContext() { context.AddRequiredAttribute(nameof(Foo.DateTime)); // 使用 AutoGenerateColumnAttribute 设置显示名称示例 - context.AddAutoGenerateColumnAttribute(nameof(Foo.DateTime), new KeyValuePair[] { new(nameof(AutoGenerateColumnAttribute.Text), LocalizerFoo[nameof(Foo.DateTime)].Value) }); + context.AddAutoGenerateColumnAttribute(nameof(Foo.DateTime), new KeyValuePair[] { new(nameof(AutoGenerateColumnAttribute.Text), FooLocalizer[nameof(Foo.DateTime)].Value) }); } else if (propertyName == nameof(Foo.Name)) { - context.AddRequiredAttribute(nameof(Foo.Name), LocalizerFoo["Name.Required"]); + context.AddRequiredAttribute(nameof(Foo.Name), FooLocalizer["Name.Required"]); // 使用 Text 设置显示名称示例 - col.Text = LocalizerFoo[nameof(Foo.Name)]; + col.Text = FooLocalizer[nameof(Foo.Name)]; } else if (propertyName == nameof(Foo.Count)) { context.AddRequiredAttribute(nameof(Foo.Count)); // 使用 DisplayNameAttribute 设置显示名称示例 - context.AddDisplayNameAttribute(nameof(Foo.Count), LocalizerFoo[nameof(Foo.Count)].Value); + context.AddDisplayNameAttribute(nameof(Foo.Count), FooLocalizer[nameof(Foo.Count)].Value); } else if (propertyName == nameof(Foo.Complete)) { col.Filterable = true; // 使用 DisplayAttribute 设置显示名称示例 - context.AddDisplayAttribute(nameof(Foo.Complete), new KeyValuePair[] { new(nameof(DisplayAttribute.Name), LocalizerFoo[nameof(Foo.Complete)].Value) }); + context.AddDisplayAttribute(nameof(Foo.Complete), new KeyValuePair[] { new(nameof(DisplayAttribute.Name), FooLocalizer[nameof(Foo.Complete)].Value) }); } else if (propertyName == nameof(Foo.Id)) { @@ -121,7 +121,7 @@ private void InitDataTable() UserData.Columns[0] ]; UserData.Columns[0].AutoIncrement = true; - Foo.GenerateFoo(LocalizerFoo, 10).ForEach(f => + Foo.GenerateFoo(FooLocalizer, 10).ForEach(f => { UserData.Rows.Add(f.Id, f.DateTime, f.Name, f.Count); }); @@ -135,7 +135,7 @@ private Task OnAddColumn() UserData.Columns.Add(nameof(Foo.Complete), typeof(bool)); // 更新数据 - var fs = Foo.GenerateFoo(LocalizerFoo, 10); + var fs = Foo.GenerateFoo(FooLocalizer, 10); for (var i = 0; i < fs.Count; i++) { UserData.Rows[i][nameof(Foo.Complete)] = fs[i].Complete; @@ -176,7 +176,7 @@ private void InitPageDataTable() PageDataTable.Columns.Add(nameof(Foo.DateTime), typeof(DateTime)); PageDataTable.Columns.Add(nameof(Foo.Name), typeof(string)); PageDataTable.Columns.Add(nameof(Foo.Count), typeof(int)); - PageFoos = Foo.GenerateFoo(LocalizerFoo, 80); + PageFoos = Foo.GenerateFoo(FooLocalizer, 80); TotalCount = PageFoos.Count; PageIndex = 1; PageItems = 2; diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor index 57a8b32fdfd..f5c54cd2e0b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor @@ -1,7 +1,7 @@ -@page "/table/dynamic-excel" +@page "/table/dynamic-excel" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject IStringLocalizer TablesLocalizer

@Localizer["TablesDynamicExcelTitle"] - @NavMenuLocalizer["TableDynamicExcel"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor.cs index ffd544e5731..8efcfba9a61 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesDynamicExcel.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -57,7 +57,7 @@ private void InitDataTable() UserData.Columns.Add(nameof(Foo.Education), typeof(string)); UserData.Columns.Add(nameof(Foo.Count), typeof(int)); - Foo.GenerateFoo(LocalizerFoo, 10).ForEach(f => + Foo.GenerateFoo(FooLocalizer, 10).ForEach(f => { UserData.Rows.Add(f.DateTime, f.Name, f.Complete, f.Education, f.Count); }); @@ -71,7 +71,7 @@ private void InitDataTableContext() if (col.GetFieldName() == nameof(Foo.Education)) { col.ComponentType = typeof(Select); - col.Items = typeof(EnumEducation).ToSelectList(new SelectedItem("", LocalizerFoo["NullItemText"].Value)); + col.Items = typeof(EnumEducation).ToSelectList(new SelectedItem("", FooLocalizer["NullItemText"].Value)); } if (col.GetFieldName() == nameof(Foo.Complete)) { @@ -109,7 +109,7 @@ private void InitDataTableKeyboard() KeyboardData.Columns.Add("Column 5", typeof(string)); var index = 0; - Foo.GenerateFoo(LocalizerFoo, 9).ForEach(f => + Foo.GenerateFoo(FooLocalizer, 9).ForEach(f => { index++; KeyboardData.Rows.Add($"Cell {index}1", $"Cell {index}2", $"Cell {index}3", $"Cell {index}4", $"Cell {index}5"); diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor index 3a6aa80dfe5..e40352d35d2 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor @@ -1,7 +1,7 @@ @page "/table/edit" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject ToastService ToastService @inject IOptions WebsiteOption @@ -309,7 +309,7 @@ ShowToolbar="true" ShowExtendButtons="true" ShowSkeleton="true"> - + diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor.cs index 79d43599ccf..e24d544beec 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesEdit.razor.cs @@ -52,11 +52,11 @@ public partial class TablesEdit ///
protected override void OnInitialized() { - Items = Foo.GenerateFoo(LocalizerFoo, 4); - EditItems = Foo.GenerateFoo(LocalizerFoo, 4); - Hobbies = Foo.GenerateHobbies(LocalizerFoo); - CustomerDataService = new FooDataService(LocalizerFoo); - BindItems = Foo.GenerateFoo(LocalizerFoo).Take(5).ToList(); + Items = Foo.GenerateFoo(FooLocalizer, 4); + EditItems = Foo.GenerateFoo(FooLocalizer, 4); + Hobbies = Foo.GenerateHobbies(FooLocalizer); + CustomerDataService = new FooDataService(FooLocalizer); + BindItems = Foo.GenerateFoo(FooLocalizer).Take(5).ToList(); PlaceHolderString ??= Localizer["TablesEditShowSearchPlaceHolderString"]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor index dde3c5c3f03..9b2d3e38adc 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor @@ -1,7 +1,7 @@ -@page "/table/excel" +@page "/table/excel" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject IOptions WebsiteOption

@Localizer["TablesExcelTitle"] - @NavMenuLocalizer["TableExcel"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor.cs index 4a7af8678e9..5e464f379ab 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExcel.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -36,7 +36,7 @@ public partial class TablesExcel protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); } private Task> OnQueryAsync(QueryPageOptions options) diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor index f568efd7ecb..273605cc32e 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor @@ -1,7 +1,7 @@ -@page "/table/export" +@page "/table/export" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["TablesExportTitle"] - @NavMenuLocalizer["TableExport"]

@((MarkupString)Localizer["TablesExportDescription1"].Value)

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor.cs index c0c6ea85775..5bf986939f1 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesExport.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -35,7 +35,7 @@ public partial class TablesExport protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); } private Task> OnQueryAsync(QueryPageOptions options) diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor index 9a884c4bf3f..ad7bc36a04f 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor @@ -1,8 +1,8 @@ -@page "/table/fix-column" +@page "/table/fix-column" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableFixColumn"]

@Localizer["TablesFixedColumnDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor.cs index b3f9282d42b..f04f055bd0c 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFixedColumn.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -24,6 +24,6 @@ public partial class TablesFixedColumn protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); } } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor index fd14d11b39f..94aa8b3e22f 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor @@ -1,8 +1,8 @@ -@page "/table/footer" +@page "/table/footer" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableFooter"]

@Localizer["TablesFooterDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor.cs index 7f69b68c1ec..2b4391457e0 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesFooter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -40,7 +40,7 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); Left ??= "Left"; Center ??= "Center"; Right ??= "Right"; diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor index 17b35396e28..1d72e19d65e 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor @@ -1,8 +1,8 @@ -@page "/table/multi-header" +@page "/table/multi-header" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableHeaderGroup"]

@Localizer["TablesHeaderDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor.cs index 92579b8da7f..69ca508c737 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesHeader.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -24,7 +24,7 @@ public partial class TablesHeader protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo, 4); + Items = Foo.GenerateFoo(FooLocalizer, 4); } private Task> OnQueryAsync(QueryPageOptions options) diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor index 49b6e55c806..032924e3101 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor @@ -1,8 +1,8 @@ -@page "/table/loading" +@page "/table/loading" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableLoading"]

@Localizer["TablesLoadingDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor.cs index 919d6bdb9c3..ce426a907ec 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLoading.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -30,8 +30,8 @@ protected override void OnInitialized() { base.OnInitialized(); - Hobbies = Foo.GenerateHobbies(LocalizerFoo); - Items = Foo.GenerateFoo(LocalizerFoo); + Hobbies = Foo.GenerateHobbies(FooLocalizer); + Items = Foo.GenerateFoo(FooLocalizer); } private static async Task OnAddAsync() diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor index f6d95d5019a..1011d0a5526 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor @@ -1,6 +1,6 @@ -@page "/table/lookup" +@page "/table/lookup" @inject IStringLocalizer NavMenuLocalizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject IStringLocalizer Localizer

@Localizer["TablesLookupTitle"] - @NavMenuLocalizer["TableLookup"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor.cs index d9461286576..cf75fb4b6b4 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesLookup.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -26,6 +26,6 @@ protected override async Task OnInitializedAsync() await Task.Delay(200); //获取随机数据 - Items = Foo.GenerateFoo(LocalizerFoo, 4); + Items = Foo.GenerateFoo(FooLocalizer, 4); } } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor index 1079ab9a2d6..6fe81016309 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor @@ -1,7 +1,7 @@ -@page "/table/page" +@page "/table/page" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["TablesPagesTitle"] - @NavMenuLocalizer["TablePage"]

@Localizer["TablesPagesDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor.cs index 5db40e47fe5..6ffe1f843e3 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesPages.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -33,7 +33,7 @@ public partial class TablesPages protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); } private Task> OnQueryAsync(QueryPageOptions options) diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor index 13d7b17465f..68256dd299e 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor @@ -1,8 +1,8 @@ -@page "/table/selection" +@page "/table/selection" @inherits WebSiteModuleComponentBase @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["TablesSelectionTitle"] - @NavMenuLocalizer["TableSelection"]

@((MarkupString)Localizer["TablesSelectionDescription"].Value)

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor.cs index b25b17c6391..9662e301a9d 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesSelection.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -42,10 +42,10 @@ public partial class TablesSelection protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); SelectedItems = Items.Take(4).ToList(); - _scrollItems.AddRange(Foo.GenerateFoo(LocalizerFoo, 20)); + _scrollItems.AddRange(Foo.GenerateFoo(FooLocalizer, 20)); } private void OnClick() diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor index 3dac103285c..4a81882ee80 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor @@ -1,7 +1,7 @@ -@page "/table/toolbar" +@page "/table/toolbar" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject ToastService ToastService

@Localizer["TablesToolbarTitle"] - @NavMenuLocalizer["TableToolbar"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor.cs index 97be41f0e2e..7dfc5b604b9 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesToolbar.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -40,7 +40,7 @@ public partial class TablesToolbar protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); } private Task> OnQueryAsync(QueryPageOptions options) diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor index a6c1720eb95..cfa2002dfef 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor @@ -1,7 +1,7 @@ -@page "/table/tracking" +@page "/table/tracking" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["TablesTrackingTitle"] - @NavMenuLocalizer["TableTracking"]

@Localizer["TablesTrackingDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor.cs index 01468480e76..034d6121f8b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTracking.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -24,6 +24,6 @@ public partial class TablesTracking protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo, 4); + Items = Foo.GenerateFoo(FooLocalizer, 4); } } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor index a29ce591394..2dfe704977e 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor @@ -1,9 +1,9 @@ -@page "/table/tree" +@page "/table/tree" @inherits BootstrapComponentBase @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject ICacheManager CacheManager

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableTree"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor.cs index 8120211a37d..4435b93c8e9 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesTree.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -21,13 +21,13 @@ protected override void OnInitialized() base.OnInitialized(); // 模拟数据从数据库中获得 - TreeItems = TreeFoo.GenerateFoos(LocalizerFoo, 3); + TreeItems = TreeFoo.GenerateFoos(FooLocalizer, 3); // 插入 Id 为 1 的子项 - TreeItems.AddRange(TreeFoo.GenerateFoos(LocalizerFoo, 2, 1, 100)); + TreeItems.AddRange(TreeFoo.GenerateFoos(FooLocalizer, 2, 1, 100)); // 插入 Id 为 101 的子项 - TreeItems.AddRange(TreeFoo.GenerateFoos(LocalizerFoo, 3, 101, 1010)); + TreeItems.AddRange(TreeFoo.GenerateFoos(FooLocalizer, 3, 101, 1010)); } private static Task OnAddAsync() => Task.FromResult(new TreeFoo() { DateTime = DateTime.Now }); @@ -61,13 +61,13 @@ private Task OnDeleteAsync(IEnumerable items) private Task> OnQueryAsync(QueryPageOptions _) { - var items = TreeFoo.GenerateFoos(LocalizerFoo, 4); + var items = TreeFoo.GenerateFoos(FooLocalizer, 4); // 插入 Id 为 1 的子项 - items.AddRange(TreeFoo.GenerateFoos(LocalizerFoo, 2, 1, 100)); + items.AddRange(TreeFoo.GenerateFoos(FooLocalizer, 2, 1, 100)); // 插入 Id 为 101 的子项 - items.AddRange(TreeFoo.GenerateFoos(LocalizerFoo, 3, 101, 1010)); + items.AddRange(TreeFoo.GenerateFoos(FooLocalizer, 3, 101, 1010)); var data = new QueryData() { @@ -103,7 +103,7 @@ private Task>> OnTreeExpand(TreeFoo foo) => C // 模拟从数据库中查询 await Task.Delay(1000); entry.SlidingExpiration = TimeSpan.FromMinutes(10); - return TreeFoo.GenerateFoos(LocalizerFoo, 2, foo.Id, foo.Id * 100).Select(i => new TableTreeNode(i)); + return TreeFoo.GenerateFoos(FooLocalizer, 2, foo.Id, foo.Id * 100).Select(i => new TableTreeNode(i)); }); /// diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor index df0358495d8..1413c26caa4 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor @@ -1,9 +1,9 @@ -@inherits BootstrapComponentBase +@inherits BootstrapComponentBase @page "/table/virtualization" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableVirtualization"]

@Localizer["TablesVirtualizationDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor.cs index 356cf8f16ee..f710300e67b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesVirtualization.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -29,7 +29,7 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Foo.GenerateFoo(LocalizerFoo); + Items = Foo.GenerateFoo(FooLocalizer); _fixedFooterSegments.AddRange( [ new SegmentedOption() { Text = Localizer["TablesFooterFixedText"], Value = true }, diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor index 25058f8a333..8750807f4ee 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor @@ -1,8 +1,8 @@ -@page "/table/wrap" +@page "/table/wrap" @inject IStringLocalizer NavMenuLocalizer @inject IStringLocalizer BaseLocalizer @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@BaseLocalizer["TableBaseTitle"] - @NavMenuLocalizer["TableWrap"]

@Localizer["TablesWrapDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor.cs index 01e861327ba..14774df5ebb 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Table/TablesWrap.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -25,12 +25,12 @@ protected override void OnInitialized() { base.OnInitialized(); - CellItems = Foo.GenerateFoo(LocalizerFoo, 4); + CellItems = Foo.GenerateFoo(FooLocalizer, 4); } private Task> OnQueryAsync(QueryPageOptions options) { - var items = Foo.GenerateFoo(LocalizerFoo); + var items = Foo.GenerateFoo(FooLocalizer); // 设置记录总数 var total = items.Count; // 内存分页 diff --git a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor index c88c3fa3e7a..cd056f605e0 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor @@ -1,6 +1,6 @@ @page "/tree-view" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["TreeViewsTitle"]

@Localizer["TreeViewsDescription"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs index 643e7f834ad..876e4365f36 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs @@ -73,7 +73,7 @@ public sealed partial class TreeViews private List> TemplateItems { get; } = TreeFoo.GetTemplateItems(); - private Foo Model => Foo.Generate(LocalizerFoo); + private Foo Model => Foo.Generate(FooLocalizer); private bool _showSearch; diff --git a/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor b/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor index f6ec6bf29dc..71f20feb1cf 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor @@ -1,6 +1,6 @@ @page "/validate-form" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer

@Localizer["ValidateFormsTitle"]

diff --git a/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs index d97ec9c33f0..4d1a25b2916 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs @@ -59,10 +59,10 @@ protected override async Task OnInitializedAsync() ValidataModel = new CustomValidataModel { Name = "", Telephone1 = "123456789", Telephone2 = "123456789" }; // 初始化参数 - Hobbies2 = Foo.GenerateHobbies(LocalizerFoo); - Hobbies3 = Foo.GenerateHobbies(LocalizerFoo); - Hobbies4 = Foo.GenerateHobbies(LocalizerFoo); - Hobbies7 = Foo.GenerateHobbies(LocalizerFoo); + Hobbies2 = Foo.GenerateHobbies(FooLocalizer); + Hobbies3 = Foo.GenerateHobbies(FooLocalizer); + Hobbies4 = Foo.GenerateHobbies(FooLocalizer); + Hobbies7 = Foo.GenerateHobbies(FooLocalizer); ComplexModel = new ComplexFoo() { diff --git a/src/BootstrapBlazor.Server/Components/Samples/WinBoxes.razor b/src/BootstrapBlazor.Server/Components/Samples/WinBoxes.razor index 922d31c76cc..f9b6528ef4c 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/WinBoxes.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/WinBoxes.razor @@ -1,6 +1,6 @@ @page "/win-box" @inject IStringLocalizer Localizer -@inject IStringLocalizer LocalizerFoo +@inject IStringLocalizer FooLocalizer @inject IOptions WebsiteOption

@Localizer["WinBoxTitle"]

From 27c2dbeee11a3f6d64ee3cd29c06e2d32ff11b39 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 12:45:37 +0800 Subject: [PATCH 7/9] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Locales/en-US.json | 4 +++- src/BootstrapBlazor.Server/Locales/zh-CN.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 2097688f261..a590c439cb9 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -3750,7 +3750,9 @@ "RowSpanTips5": "Row shows 2, the first component ColSpan is set to 3", "RowSpanTips6": "A component in a row", "RowSpanTitle": "Cross-column", - "RowsTitle": "Row" + "RowsTitle": "Row", + "Normal": "Normal", + "Inline": "Inline" }, "BootstrapBlazor.Server.Components.Samples.Scrolls": { "ScrollDescription": "Add scroll bars to components whose height or width exceeds the standard", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 3b4067fd8cb..05f2ae99f4e 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -3750,7 +3750,9 @@ "RowSpanTips5": "行显示 2 个,第一个组件 ColSpan 设置为 3", "RowSpanTips6": "行显示一个组件", "RowSpanTitle": "跨列功能", - "RowsTitle": "Row 布局组件" + "RowsTitle": "Row 布局组件", + "Normal": "正常", + "Inline": "行内" }, "BootstrapBlazor.Server.Components.Samples.Scrolls": { "ScrollDescription": "给高度或者宽度超标的组件增加滚动条", From e7389a1d10f52f0118c648ccb671d86a2954f2fa Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 12:51:48 +0800 Subject: [PATCH 8/9] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Components/FormInlineSwitch.razor.cs | 6 ++---- src/BootstrapBlazor.Server/Locales/en-US.json | 8 +++++--- src/BootstrapBlazor.Server/Locales/zh-CN.json | 8 +++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs index 28bd6d81f4a..b64a4e3ecee 100644 --- a/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Components/FormInlineSwitch.razor.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using BootstrapBlazor.Server.Components.Samples; - namespace BootstrapBlazor.Server.Components.Components; /// @@ -20,7 +18,7 @@ public partial class FormInlineSwitch [Inject] [NotNull] - private IStringLocalizer? RowsLocalizer { get; set; } + private IStringLocalizer? Localizer { get; set; } /// /// @@ -59,6 +57,6 @@ protected override void OnInitialized() { base.OnInitialized(); - Items = Enum.GetNames().Select(i => new SelectedItem(i, RowsLocalizer[i])); + Items = Enum.GetNames().Select(i => new SelectedItem(i, Localizer[i])); } } diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index a590c439cb9..702eecc1021 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -48,6 +48,10 @@ "BootstrapBlazor.Server.Components.Components.EventTable": { "Title": "Event" }, + "BootstrapBlazor.Server.Components.Components.FormInlineSwitch": { + "Inline": "Inline", + "Normal": "Normal" + }, "BootstrapBlazor.Server.Components.Components.GlobalSearch": { "ArrowKeyText": "to Navigate", "EmptySearchResultPlaceHolder": "No match searches", @@ -3750,9 +3754,7 @@ "RowSpanTips5": "Row shows 2, the first component ColSpan is set to 3", "RowSpanTips6": "A component in a row", "RowSpanTitle": "Cross-column", - "RowsTitle": "Row", - "Normal": "Normal", - "Inline": "Inline" + "RowsTitle": "Row" }, "BootstrapBlazor.Server.Components.Samples.Scrolls": { "ScrollDescription": "Add scroll bars to components whose height or width exceeds the standard", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 05f2ae99f4e..12a3a202217 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -48,6 +48,10 @@ "BootstrapBlazor.Server.Components.Components.EventTable": { "Title": "事件 Event" }, + "BootstrapBlazor.Server.Components.Components.FormInlineSwitch": { + "Inline": "行内", + "Normal": "正常" + }, "BootstrapBlazor.Server.Components.Components.GlobalSearch": { "ArrowKeyText": "导航", "EmptySearchResultPlaceHolder": "无匹配搜索", @@ -3750,9 +3754,7 @@ "RowSpanTips5": "行显示 2 个,第一个组件 ColSpan 设置为 3", "RowSpanTips6": "行显示一个组件", "RowSpanTitle": "跨列功能", - "RowsTitle": "Row 布局组件", - "Normal": "正常", - "Inline": "行内" + "RowsTitle": "Row 布局组件" }, "BootstrapBlazor.Server.Components.Samples.Scrolls": { "ScrollDescription": "给高度或者宽度超标的组件增加滚动条", From fd54f887306c67dd725fcdecc95857c0cf7c8e3c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 30 Jan 2026 12:54:28 +0800 Subject: [PATCH 9/9] =?UTF-8?q?doc:=20=E5=88=A0=E9=99=A4=20EventTable=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Components/EventTable.razor | 17 ----------------- src/BootstrapBlazor.Server/Locales/en-US.json | 3 --- src/BootstrapBlazor.Server/Locales/zh-CN.json | 3 --- 3 files changed, 23 deletions(-) delete mode 100644 src/BootstrapBlazor.Server/Components/Components/EventTable.razor diff --git a/src/BootstrapBlazor.Server/Components/Components/EventTable.razor b/src/BootstrapBlazor.Server/Components/Components/EventTable.razor deleted file mode 100644 index 99cf2ba1c20..00000000000 --- a/src/BootstrapBlazor.Server/Components/Components/EventTable.razor +++ /dev/null @@ -1,17 +0,0 @@ -@inject IStringLocalizer Localizer - -
-

@Localizer["Title"]

- - - - - - - -
-
- -@code { - [Parameter] public IEnumerable? Items { get; set; } -} diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 702eecc1021..f1390d8a18d 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -45,9 +45,6 @@ "ButtonText": "SetTitle", "Info": "Reset the title of this TabItem by click the button" }, - "BootstrapBlazor.Server.Components.Components.EventTable": { - "Title": "Event" - }, "BootstrapBlazor.Server.Components.Components.FormInlineSwitch": { "Inline": "Inline", "Normal": "Normal" diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 12a3a202217..47f65bd1bca 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -45,9 +45,6 @@ "ButtonText": "更改标题", "Info": "点击下方按钮,本 TabItem 标题更改为当前分钟与秒" }, - "BootstrapBlazor.Server.Components.Components.EventTable": { - "Title": "事件 Event" - }, "BootstrapBlazor.Server.Components.Components.FormInlineSwitch": { "Inline": "行内", "Normal": "正常"