Skip to content

Commit 81f8a34

Browse files
authored
doc(Localization): add others language localization list (#7686)
* doc: 更新 SiteTitle 资源文件 * doc: 更新葡萄牙语 * doc: 更新资源文件 * doc: 增加其他国家语言列表 * doc: 调整顺序 * doc: 资源文件调整顺序
1 parent 153168f commit 81f8a34

4 files changed

Lines changed: 23 additions & 13 deletions

File tree

src/BootstrapBlazor.Server/Components/Layout/NavMenu.razor.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -20,10 +20,6 @@ public partial class NavMenu
2020
[NotNull]
2121
private string? ExpandAllText { get; set; }
2222

23-
[Inject]
24-
[NotNull]
25-
private IStringLocalizer<BaseLayout>? AppLocalizer { get; set; }
26-
2723
[Inject]
2824
[NotNull]
2925
private TitleService? TitleService { get; set; }
@@ -65,7 +61,7 @@ private async Task OnClickMenu(MenuItem item)
6561
{
6662
if (!item.Items.Any() && !string.IsNullOrEmpty(item.Text))
6763
{
68-
await TitleService.SetTitle($"{item.Text} - {AppLocalizer["SiteTitle"]}");
64+
await TitleService.SetTitle($"{item.Text} - {Localizer["SiteTitle"]}");
6965
}
7066
}
7167
}

src/BootstrapBlazor.Server/Components/Pages/Localization.razor

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@page "/localization"
1+
@page "/localization"
22
@inject IStringLocalizer<Localization> Localizer
33

44
<h3>@Localizer["Title"]</h3>
@@ -28,6 +28,10 @@
2828
<li>@Localizer["N8"]</li>
2929
<li>@Localizer["N9"]</li>
3030
<li>@Localizer["ES"]</li>
31+
<li>@Localizer["RU"]</li>
32+
<li>@Localizer["TH"]</li>
33+
<li>@Localizer["UK"]</li>
34+
<li>@Localizer["IT"]</li>
3135
<li>@Localizer["TW"]</li>
3236
</ul>
3337
<div class="mt-2">

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
"Services": "Services",
374374
"ShieldBadge": "ShieldBadge",
375375
"SignaturePad": "SignaturePad",
376+
"SiteTitle": "Bootstrap Blazor enterprise-level UI component library",
376377
"Skeleton": "Skeleton",
377378
"SlideButton": "SlideButton",
378379
"Slider": "Slider",
@@ -598,6 +599,7 @@
598599
"BootstrapBlazor.Server.Components.Pages.Localization": {
599600
"AdditionalJsonFile": "Additional <code>json</code> localization file",
600601
"ES": "Spanish (es)",
602+
"IT": "Italian(it-IT)",
601603
"LocalizationFileDesc": "The component built-in localization resource files are <code>en</code> <code>zh</code>. The other localization resource files <code>de</code> <code>es</code> <code>pt</code> <code>zh-TW</code> which are placed in the project folder <code>localization</code>. you can be downloaded by yourself and imported into the project through the injection service",
602604
"N1": "How localization works in components",
603605
"N10": "The component has a built-in localization language fallback mechanism. For example, the request culture is",
@@ -661,16 +663,19 @@
661663
"N63": "Ignore the loss of localized key-value culture information",
662664
"N7": "English (en)",
663665
"N8": "German (de)",
664-
"N9": "Portuguese (pu)",
666+
"N9": "Portuguese (pt)",
665667
"P1": "Localization is the process of customizing an application for a given language and region.",
666668
"P2": "A component allows you to translate its UI elements into the desired language. This includes text for buttons, filter operator properties, etc. The component uses the current request by default",
667669
"P3": "Culture language, this article will show you how to use this feature in your app",
670+
"RU": "Russian(ru-RU)",
668671
"T1": "Please check before reading the following knowledge points",
669672
"T2": "Microsoft Official Documentation",
670673
"T3": "because",
671674
"T4": "The mode cannot obtain the system language and culture information, the default culture information is",
675+
"TH": "Thai(th-TH)",
672676
"Title": "Localization",
673-
"TW": "中國台灣 (zh-TW)"
677+
"TW": "中國台灣 (zh-TW)",
678+
"UK": "Ukrainian(uk-UA)"
674679
},
675680
"BootstrapBlazor.Server.Components.Pages.Online": {
676681
"Browser": "Browser",
@@ -4544,6 +4549,7 @@
45444549
"TablesColumnTitle": "Table Column"
45454550
},
45464551
"BootstrapBlazor.Server.Components.Samples.Table.TablesColumnList": {
4552+
"IsPopoverToolbarDropdownButtonDesc": "The <code>IsPopoverToolbarDropdownButton</code> parameter controls whether the column list is displayed as a popover or a dropdown menu. The default value is <code>false</code>, which means it is displayed as a dropdown menu. When set to <code>true</code>, it is displayed as a popover.",
45474553
"ResetVisibleColumnsButtonText": "Set Columns",
45484554
"ResetVisibleColumnsDesc": "Call the instancel method <code>ResetVisibleColumns</code> of <code>Table</code> for set the multiple columns visible value",
45494555
"ShowColumnListControlsDesc": "The <code>ShowColumnListControls</code> setting controls whether the column dropdown list displays control buttons. The built-in control buttons are <code>All</code> and <code>Invert</code>.",
@@ -4559,7 +4565,6 @@
45594565
"ShownWithBreakPointP4": "Because the <code>Table</code> component supports mobile adaptation by default, the card mode is used for small screens. In this example, the explicit setting uses <code>RenderMode=\"TableRenderMode. Table\"</code> mode",
45604566
"ShownWithBreakPointTitle": "Automatically show/hide columns based on screen width",
45614567
"TablesColumnDescription": "Used to display multiple pieces of data with similar structures, data can be sorted, filtered, compared or other custom operations.",
4562-
"IsPopoverToolbarDropdownButtonDesc": "The <code>IsPopoverToolbarDropdownButton</code> parameter controls whether the column list is displayed as a popover or a dropdown menu. The default value is <code>false</code>, which means it is displayed as a dropdown menu. When set to <code>true</code>, it is displayed as a popover.",
45634568
"TablesColumnTitle": "Table Column",
45644569
"VisibleIntro": "Set whether the column is displayed by specifying the <code>ShowColumnList</code> attribute",
45654570
"VisibleP1": "<code>ShowColumnList</code> The default value is false, and if it is explicitly specified as true, the corresponding column adjustment button will appear in the toolbar",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
"Services": "内置服务",
374374
"ShieldBadge": "徽章组件 ShieldBadge",
375375
"SignaturePad": "手写签名 SignaturePad",
376+
"SiteTitle": "Bootstrap Blazor - 组件库",
376377
"Skeleton": "骨架屏 Skeleton",
377378
"SlideButton": "快捷菜单 SlideButton",
378379
"Slider": "滑块 Slider",
@@ -598,6 +599,7 @@
598599
"BootstrapBlazor.Server.Components.Pages.Localization": {
599600
"AdditionalJsonFile": "额外本地化语言 <code>json</code> 文件",
600601
"ES": "西班牙语(es)",
602+
"IT": "意大利(it-IT)",
601603
"LocalizationFileDesc": "组件内置本地化资源文件为 <code>en</code> <code>zh</code> 由网友提供的其他本地化资源文件 <code>de</code> <code>es</code> <code>pt</code> <code>zh-TW</code> 放置在项目文件夹 <code>localization</code> 内,可自行下载通过注入服务引入到项目中",
602604
"N1": "本地化在组件中的工作原理",
603605
"N10": "组件内置本地化语言回退机制,如请求文化为",
@@ -661,16 +663,19 @@
661663
"N63": "忽略本地化键值文化信息丢失",
662664
"N7": "英语(en)",
663665
"N8": "德语(de)",
664-
"N9": "葡萄牙语(pu",
666+
"N9": "葡萄牙语(pt",
665667
"P1": "本地化是为给定语言和地区定制应用程序的过程.",
666668
"P2": "组件允许您将其 UI 元素转换为所需的语言。这包括按钮、过滤器操作符属性等文本。组件内部默认使用当前请求",
667669
"P3": "文化语言,本文将向您展示如何在应用程序中使用此功能",
670+
"RU": "俄语(ru-RU)",
668671
"T1": "阅读以下知识点前请先查看",
669672
"T2": "微软官方文档",
670673
"T3": "由于",
671674
"T4": "模式无法获取系统语言文化信息,默认文化信息为",
675+
"TH": "泰语(th-TH)",
672676
"Title": "本地化",
673-
"TW": "中國台灣(zh-TW)"
677+
"TW": "中國台灣(zh-TW)",
678+
"UK": "乌克兰语(uk-UA)"
674679
},
675680
"BootstrapBlazor.Server.Components.Pages.Online": {
676681
"Browser": "浏览器",
@@ -4544,6 +4549,7 @@
45444549
"TablesColumnTitle": "Table 表格"
45454550
},
45464551
"BootstrapBlazor.Server.Components.Samples.Table.TablesColumnList": {
4552+
"IsPopoverToolbarDropdownButtonDesc": "通过设置 <code>IsPopoverToolbarDropdownButton</code> 属性,工具栏列下拉框显示为气泡弹窗形式",
45474553
"ResetVisibleColumnsButtonText": "设置列隐藏信息",
45484554
"ResetVisibleColumnsDesc": "通过调用 <code>Table</code> 实例方法 <code>ResetVisibleColumns</code> 可设置任意列显示隐藏属性",
45494555
"ShowColumnListControlsDesc": "通过设置 <code>ShowColumnListControls</code> 控制列下拉框是否显示控制按钮,内置控制按钮有 <code>全选</code> 与 <code>反选</code> 两个按钮",
@@ -4559,7 +4565,6 @@
45594565
"ShownWithBreakPointP4": "由于 <code>Table</code> 组件默认是支持移动端适配,所以小屏幕时采用的是卡片式模式,本例中显式设置使用 <code>RenderMode=\"TableRenderMode.Table\"</code> 模式",
45604566
"ShownWithBreakPointTitle": "根据屏幕宽度自动显示/隐藏列",
45614567
"TablesColumnDescription": "用于展示多条结构类似的数据,可对数据进行排序、筛选、对比或其他自定义操作。",
4562-
"IsPopoverToolbarDropdownButtonDesc": "通过设置 <code>IsPopoverToolbarDropdownButton</code> 属性,工具栏列下拉框显示为气泡弹窗形式",
45634568
"TablesColumnTitle": "Table 表格",
45644569
"VisibleIntro": "通过指定 <code>ShowColumnList</code> 属性设置列是否显示",
45654570
"VisibleP1": "<code>ShowColumnList</code> 默认值为 false,显式指定为 true 后工具栏出现相应列调整按钮",

0 commit comments

Comments
 (0)