Skip to content

Commit 04bec17

Browse files
authored
doc(ColorPicker): add localization doc (#6843)
* doc: 增加本地化 * doc: 更新 ColorPicker 示例
1 parent 60d56dc commit 04bec17

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
<DemoBlock Title="@Localizer["ValueTitle"]" Introduction="@Localizer["ValueIntro"]" Name="Value">
1414
<p>@((MarkupString)Localizer["ValueDescription"].Value)</p>
15-
<ColorPicker Value="@Value" />
15+
<ColorPicker Value="@Value"></ColorPicker>
1616
</DemoBlock>
1717

1818
<DemoBlock Title="@Localizer["BindValueTitle"]" Introduction="@Localizer["BindValueIntro"]" Name="BindValue">
19-
<ColorPicker @bind-Value="@Value" />
19+
<ColorPicker @bind-Value="@Value"></ColorPicker>
2020
<div class="mt-3">Value: @Value</div>
2121
</DemoBlock>
2222

2323
<DemoBlock Title="@Localizer["DisabledTitle"]" Introduction="@Localizer["DisabledIntro"]" Name="Disabled">
24-
<ColorPicker Value="@Value" IsDisabled="true" />
24+
<ColorPicker Value="@Value" IsDisabled="true"></ColorPicker>
2525
</DemoBlock>
2626

2727
<DemoBlock Title="@Localizer["TemplateTitle"]" Introduction="@Localizer["TemplateIntro"]" Name="Template">
@@ -40,7 +40,7 @@
4040
<ValidateForm Model="Dummy">
4141
<div class="row g-3 form-inline">
4242
<div class="col-6">
43-
<ColorPicker @bind-Value="@Dummy.Name" />
43+
<ColorPicker @bind-Value="@Dummy.Name"></ColorPicker>
4444
</div>
4545
</div>
4646
</ValidateForm>
@@ -50,14 +50,14 @@
5050
<section ignore>
5151
<div class="row form-inline">
5252
<div class="col-12 col-sm-6">
53-
<Switch @bind-Value="_opacityIsSupport" DisplayText="SupportOpacity" ShowLabel="true"></Switch>
53+
<Switch @bind-Value="_opacityIsSupport" DisplayText="@Localizer["SupportOpacity"]" ShowLabel="true"></Switch>
5454
</div>
5555
<div class="col-12 col-sm-6">
56-
<Switch @bind-Value="_opacityIsDisabled" DisplayText="Disabled" ShowLabel="true"></Switch>
56+
<Switch @bind-Value="_opacityIsDisabled" DisplayText="@Localizer["Disabled"]" ShowLabel="true"></Switch>
5757
</div>
5858
</div>
5959
</section>
60-
<ColorPicker @bind-Value="@_opacityValue" IsSupportOpacity="_opacityIsSupport" IsDisabled="_opacityIsDisabled" />
60+
<ColorPicker @bind-Value="@_opacityValue" IsSupportOpacity="_opacityIsSupport" IsDisabled="_opacityIsDisabled"></ColorPicker>
6161
</DemoBlock>
6262

6363
<AttributeTable Items="@GetAttributes()" />

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2421,7 +2421,9 @@
24212421
"AttributeTemplate": "The template for display",
24222422
"AttributeFormatter": "Display color value formatting callback method",
24232423
"AttributeIsSupportOpacity": "Whether to support transparency",
2424-
"AttributeSwatches": "Preset candidate colors"
2424+
"AttributeSwatches": "Preset candidate colors",
2425+
"SupportOpacity": "Support Opacity",
2426+
"Disabled": "Disabled"
24252427
},
24262428
"BootstrapBlazor.Server.Components.Samples.DateTimePickers": {
24272429
"Title": "DatePicker",

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2421,7 +2421,9 @@
24212421
"AttributeTemplate": "显示模板",
24222422
"AttributeFormatter": "显示颜色值格式化回调方法",
24232423
"AttributeIsSupportOpacity": "是否支持透明度",
2424-
"AttributeSwatches": "预设候选颜色"
2424+
"AttributeSwatches": "预设候选颜色",
2425+
"SupportOpacity": "支持透明",
2426+
"Disabled": "禁用"
24252427
},
24262428
"BootstrapBlazor.Server.Components.Samples.DateTimePickers": {
24272429
"Title": "DatePicker 日期选择器",

0 commit comments

Comments
 (0)