diff --git a/src/BootstrapBlazor.Shared/Locales/en.json b/src/BootstrapBlazor.Shared/Locales/en.json index bc37ffb9d..f600c79d8 100644 --- a/src/BootstrapBlazor.Shared/Locales/en.json +++ b/src/BootstrapBlazor.Shared/Locales/en.json @@ -1,6 +1,57 @@ { - "BootstrapBlazor.Shared.App": { - "Title": "Bootstrap of Blazor" + "BootstrapBlazor.Shared.Pages.Index": { + "Title": "Bootstrap Blazor-Enterprise-level UI component library", + "HeaderTitle": "Bootstrap style Blazor UI component library", + "HeaderDesc": "Based on the Bootstrap style library, it is carefully built, and {0} a variety of commonly used components have been added to bring you an extraordinary feeling for rapid development projects", + "HeaderBody": "Committed to building the whole network", + "HeaderBody1": "The most fun of component library", + "DynamicText": "Best to use", + "DynamicText1": "Best looking", + "DynamicText2": "The most simple and practical", + "TagTitle": "Component", + "Span1": "Tree Component", + "Span2": "Menu Component", + "Span3": "Tag Component", + "Span4": "Table Component", + "Span5": "Layout Component", + "Span6": "Notification Component", + "Span7": "Upload Component", + "Span8": "Switch Component", + "CarouselH1": "Chart Component", + "CarouselP1": "Provide a variety of commonly used chart components", + "CarouselH2": "Chart IconComponent", + "CarouselP2": "Multi-dimensional data comparison", + "CarouselH3": "Full-featured table component", + "CarouselP3": "With all functions of adding, deleting, modifying, searching, paging, and sorting", + "CarouselH4": "Super timeline function", + "CarouselP4": "Custom nodes display arbitrary components", + "ContainerH1": "Rich Components", + "ContainerD1": "This set of components library contains more than {0} multiple components, from simple buttons to complex page-level components", + "ContainerH2": "Performance", + "ContainerD2": "Each control has been fine-tuned to optimize the refresh logic between parent and child components to avoid multiple loop updates", + "ContainerH3": "Easy to use", + "ContainerD3": "Easily grasp how to use components and quickly incorporate BootstrapBlazor controls into the project", + "ContainerH4": "Free and open source", + "ContainerD4": "Simple, direct, free to use, no dependent components, dependent on jQuery Bootstrap are all built-in", + "ContainerH5": "Demos and examples", + "ContainerD5": "Detailed documentation and online demonstration, simple function setting, direct copy code out of the box", + "ContainerH6": "Continually updated", + "ContainerD6": "Gitee platform hosting open source, never closed source, continuous update, timely response to questions and feedback", + "DonateH1": "Donate", + "DonateH2": "Scan the code to donate and invite the author to have a cup of coffee" + }, + "BootstrapBlazor.Shared.Shared.HomeLayout": { + "FooterH1": "Related Works", + "FooterLi1": "Slider verification code", + "FriendLink": "Links", + "FriendLi1": "Lin Dexi's Blog", + "FriendLi2": "CCFlow", + "Community": "Community", + "CommunityLi1": "Contribution guide", + "CommunityLi2": "Join us", + "CommunityLi3": "Contact details", + "SpecialAcknowledgements": "Special Thanks", + "Footer": "Gitee Hosting Platform" }, "BootstrapBlazor.Shared.Pages.Components.Block": { "Title": "", diff --git a/src/BootstrapBlazor.Shared/Locales/zh.json b/src/BootstrapBlazor.Shared/Locales/zh.json index 1c09ff24c..2bb5cf2ec 100644 --- a/src/BootstrapBlazor.Shared/Locales/zh.json +++ b/src/BootstrapBlazor.Shared/Locales/zh.json @@ -1,6 +1,57 @@ { - "BootstrapBlazor.Shared.App": { - "Title": "Bootstrap Blazor - 企业级 UI 组件库" + "BootstrapBlazor.Shared.Pages.Index": { + "Title": "Bootstrap Blazor - 企业级 UI 组件库", + "HeaderTitle": "Bootstrap 风格的 Blazor UI 组件库", + "HeaderDesc": "基于 Bootstrap 样式库精心打造,并且额外增加了 {0} 多种常用的组件,为您快速开发项目带来非一般的感觉", + "HeaderBody": "致力于打造全网", + "HeaderBody1": "最好玩的组件库", + "DynamicText": "最好用的", + "DynamicText1": "最好看的", + "DynamicText2": "最简单实用的", + "TagTitle": "组件", + "Span1": "树形组件", + "Span2": "菜单组件", + "Span3": "标签组件", + "Span4": "表格组件", + "Span5": "布局组件", + "Span6": "通知组件", + "Span7": "上传组件", + "Span8": "开关组件", + "CarouselH1": "Chart 图表组件", + "CarouselP1": "提供常用的多种图表组件", + "CarouselH2": "Chart 图标组件", + "CarouselP2": "多维度数据对比", + "CarouselH3": "全功能表格组件", + "CarouselP3": "具备增删改查搜、分页、排序所有功能", + "CarouselH4": "超强时间线功能", + "CarouselP4": "自定义节点显示任意组件", + "ContainerH1": "丰富组件", + "ContainerD1": "本套组件库包含超过 {0} 多个组件,从简单的按钮到复杂的整页面级别的组件", + "ContainerH2": "性能", + "ContainerD2": "每个控件都经过微调,优化父子组件之间刷新逻辑,避免多次循环更新", + "ContainerH3": "简单易用", + "ContainerD3": "轻松掌握组件使用方法,快速将 BootstrapBlazor 控件融入到项目中", + "ContainerH4": "免费开源", + "ContainerD4": "简单、直接、免费使用、无依赖组件,依赖 jQuery Bootstrap 均已内置", + "ContainerH5": "演示与示例", + "ContainerD5": "详细文档与在线演示,功能设置简单,直接拷贝代码开箱即用", + "ContainerH6": "持续更新", + "ContainerD6": "码云平台托管开源,永不闭源,持续更新,及时响应问题与反馈", + "DonateH1": "捐助", + "DonateH2": "扫码捐助请作者喝一杯咖啡" + }, + "BootstrapBlazor.Shared.Shared.HomeLayout": { + "FooterH1": "相关作品", + "FooterLi1": "滑块验证码", + "FriendLink": "友情链接", + "FriendLi1": "林德熙的博客", + "FriendLi2": "驰骋工作流", + "Community": "社区", + "CommunityLi1": "贡献指南", + "CommunityLi2": "加入我们", + "CommunityLi3": "联系方式", + "SpecialAcknowledgements": "特别鸣谢", + "Footer": "码云托管平台" }, "BootstrapBlazor.Shared.Pages.Components.Block": { "Title": "未设置", diff --git a/src/BootstrapBlazor.Shared/Pages/Index.razor b/src/BootstrapBlazor.Shared/Pages/Index.razor index fd5e12d48..6cd28e61e 100644 --- a/src/BootstrapBlazor.Shared/Pages/Index.razor +++ b/src/BootstrapBlazor.Shared/Pages/Index.razor @@ -11,41 +11,41 @@

- Bootstrap 风格的 Blazor UI 组件库 + @Localizer["HeaderTitle"]

-
基于 Bootstrap 样式库精心打造,并且额外增加了 @Options.Value.TotalCount 多种常用的组件,为您快速开发项目带来非一般的感觉
+
@((MarkupString)Localizer["HeaderDesc", Options.Value.TotalCount].Value)
- 致力于打造全网| -
最好玩的组件库
+ @Localizer["HeaderBody"]| +
@Localizer["HeaderBody1"]
@@ -65,8 +65,8 @@
@@ -76,8 +76,8 @@ @@ -87,8 +87,8 @@ @@ -98,8 +98,8 @@ @@ -125,8 +125,8 @@

components

-

丰富组件

-
本套组件库包含超过 @Options.Value.TotalCount 多个组件,从简单的按钮到复杂的整页面级别的组件
+

@Localizer["ContainerH1"]

+
@((MarkupString)Localizer["ContainerD1", Options.Value.TotalCount].Value)
@@ -134,10 +134,8 @@

components

-

性能

-
- 每个控件都经过微调,优化父子组件之间刷新逻辑,避免多次循环更新 -
+

@Localizer["ContainerH2"]

+
@Localizer["ContainerD2"]
@@ -145,8 +143,8 @@

components

-

简单易用

-
轻松掌握组件使用方法,快速将 BootstrapBlazor 控件融入到项目中
+

@Localizer["ContainerH3"]

+
@Localizer["ContainerD3"]
@@ -154,8 +152,8 @@

components

-

免费开源

-
简单、直接、免费使用、无依赖组件,依赖 jQuery Bootstrap 均已内置
+

@Localizer["ContainerH4"]

+
@Localizer["ContainerD4"]
@@ -163,8 +161,8 @@

components

-

演示与示例

-
详细文档与在线演示,功能设置简单,直接拷贝代码开箱即用
+

@Localizer["ContainerH5"]

+
@Localizer["ContainerD5"]
@@ -172,15 +170,15 @@

components

-

持续更新

-
码云平台托管开源,永不闭源,持续更新,及时响应问题与反馈
+

@Localizer["ContainerH6"]

+
@Localizer["ContainerD6"]
diff --git a/src/BootstrapBlazor.Shared/Pages/Index.razor.cs b/src/BootstrapBlazor.Shared/Pages/Index.razor.cs index c06da8833..23754c697 100644 --- a/src/BootstrapBlazor.Shared/Pages/Index.razor.cs +++ b/src/BootstrapBlazor.Shared/Pages/Index.razor.cs @@ -23,7 +23,7 @@ namespace BootstrapBlazor.Shared.Pages [Inject] [NotNull] - private IStringLocalizer? Localizer { get; set; } + private IStringLocalizer? Localizer { get; set; } [Inject] [NotNull] @@ -40,7 +40,7 @@ namespace BootstrapBlazor.Shared.Pages if (firstRender && JSRuntime != null) { - await JSRuntime.InvokeVoidAsync("$.indexTyper", TypeElement); + await JSRuntime.InvokeVoidAsync("$.indexTyper", TypeElement, Localizer["DynamicText"].Value.ToCharArray(), Localizer["DynamicText1"].Value.ToCharArray(), Localizer["DynamicText2"].Value.ToCharArray()); } } } diff --git a/src/BootstrapBlazor.Shared/Shared/HomeLayout.razor b/src/BootstrapBlazor.Shared/Shared/HomeLayout.razor index 9a3f83dd2..f5f0c8a80 100644 --- a/src/BootstrapBlazor.Shared/Shared/HomeLayout.razor +++ b/src/BootstrapBlazor.Shared/Shared/HomeLayout.razor @@ -3,19 +3,20 @@ @inject NavigationManager NavigationManager @inject IJSRuntime JSRuntime @inject IOptions WebsiteOption +@inject IStringLocalizer Localizer @Body