Skip to content

Commit abd5eb9

Browse files
ArgoZhangdensen2014
andcommitted
doc: 增加本地化
Co-Authored-By: Alex chow <[email protected]>
1 parent 31b2d01 commit abd5eb9

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

src/BootstrapBlazor.Server/Components/Components/GlobalSearch.razor

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
@inject IStringLocalizer<GlobalSearch> Localizer
22

3-
<MeiliSearchBox SearchBoxPlaceHolder="@Localizer["SearchPlaceHolder"]" SearchStatus="@Localizer["SearchStatus"]" SearchResultPlaceHolder="@Localizer["SearchResultPlaceHolder"]" SearchableColumns="SearchableColumns"></MeiliSearchBox>
3+
<MeiliSearchBox SearchBoxPlaceHolder="@Localizer["SearchPlaceHolder"]"
4+
SearchStatus="@Localizer["SearchStatus"]"
5+
EnterKeyText="@Localizer["EnterKeyText"]"
6+
ArrowKeyText="@Localizer["ArrowKeyText"]"
7+
EscKeyText="@Localizer["EscKeyText"]"
8+
SearchResultPlaceHolder="@Localizer["SearchResultPlaceHolder"]"
9+
SearchableColumns="SearchableColumns"></MeiliSearchBox>
410

511
@code {
612
private List<string> SearchableColumns { get; set; } = new List<string> { "menu", "title", "subTitle", "demos.title", "demos.raw" };

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4470,7 +4470,10 @@
44704470
"BootstrapBlazor.Server.Components.Components.GlobalSearch": {
44714471
"SearchPlaceHolder": "search",
44724472
"SearchStatus": "Powered by BootstrapBlazor",
4473-
"SearchResultPlaceHolder": "Type something to search"
4473+
"SearchResultPlaceHolder": "Type something to search",
4474+
"EnterKeyText": "to Select",
4475+
"ArrowKeyText": "to Navigate",
4476+
"EscKeyText": "to Close"
44744477
},
44754478
"BootstrapBlazor.Server.Components.Components.Header": {
44764479
"DownloadText": "Download",

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4470,7 +4470,10 @@
44704470
"BootstrapBlazor.Server.Components.Components.GlobalSearch": {
44714471
"SearchPlaceHolder": "搜索",
44724472
"SearchStatus": "Powered by BootstrapBlazor",
4473-
"SearchResultPlaceHolder": "键入要搜索的内容"
4473+
"SearchResultPlaceHolder": "键入要搜索的内容",
4474+
"EnterKeyText": "选择",
4475+
"ArrowKeyText": "导航",
4476+
"EscKeyText": "关闭"
44744477
},
44754478
"BootstrapBlazor.Server.Components.Components.Header": {
44764479
"DownloadText": "Download",

0 commit comments

Comments
 (0)