Skip to content

Commit c267223

Browse files
authored
doc(Reconnector): update localization (#7578)
1 parent 65a44f0 commit c267223

3 files changed

Lines changed: 50 additions & 17 deletions

File tree

src/BootstrapBlazor.Server/Components/Components/BlazorReconnector.razor

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@inject IOptions<WebsiteOptions> WebsiteOption
2+
@inject IStringLocalizer<BlazorReconnector> Localizer
23

34
<Reconnector>
45
<ReconnectingTemplate>
@@ -7,13 +8,13 @@
78
<div class="row g-3">
89
@RenderBootstrapBlazor
910
<div class="col-12 col-sm-5">
10-
<h5>Reconnector 组件</h5>
11-
<p><b>正在尝试重新连接服务器</b></p>
12-
<p>服务器正在更新新版本,稍等一会儿即可提供服务,或者 <kbd>F12</kbd> 打开 <b>Developer tools</b> 查看 <b>控制台</b> 是否有错误输出,请扫描左侧二维码加群与管理员联系</p>
11+
<h5>@Localizer["Title"]</h5>
12+
<p><b>@Localizer["ReconnectingTitle"]</b></p>
13+
<p>@((MarkupString)Localizer["ReconnectingDescription"].Value)</p>
1314
</div>
1415
<div class="col-12 col-sm-2">
1516
<div class="d-flex align-items-center justify-content-center h-100">
16-
<a href="javascript:window.Blazor.reconnect()" class="btn btn-primary">重新连接</a>
17+
<a href="javascript:window.Blazor.reconnect()" class="btn btn-primary">@Localizer["ReconnectButton"]</a>
1718
</div>
1819
</div>
1920
</div>
@@ -25,14 +26,14 @@
2526
<div class="row g-3">
2627
@RenderBootstrapBlazor
2728
<div class="col-12 col-sm-5">
28-
<h5>Reconnector 组件</h5>
29-
<p><b>与服务器连接失败</b></p>
30-
<div>请确认网络是否正常,或者 <kbd>F12</kbd> 打开 <b>Developer tools</b> 查看 <b>控制台</b> 是否有错误输出,请扫描左侧二维码加群与管理员联系</div>
29+
<h5>@Localizer["Title"]</h5>
30+
<p><b>@Localizer["ReconnectFailedTitle"]</b></p>
31+
<div>@((MarkupString)Localizer["ReconnectFailedDescription"].Value)</div>
3132
</div>
3233
<div class="col-12 col-sm-2">
3334
<div class="d-flex flex-column align-items-center justify-content-center h-100">
34-
<a href="javascript:window.Blazor.reconnect()" class="btn btn-primary mb-3">重新连接</a>
35-
<a href="javascript:location.reload()" class="btn btn-info">重新加载</a>
35+
<a href="javascript:window.Blazor.reconnect()" class="btn btn-primary mb-3">@Localizer["ReconnectButton"]</a>
36+
<a href="javascript:location.reload()" class="btn btn-info">@Localizer["ReloadButton"]</a>
3637
</div>
3738
</div>
3839
</div>
@@ -44,13 +45,13 @@
4445
<div class="row g-3">
4546
@RenderBootstrapBlazor
4647
<div class="col-12 col-sm-5">
47-
<h5>Reconnector 组件</h5>
48-
<p><b>服务器拒绝连接</b></p>
49-
<div>所有的连接尝试都被拒绝了,这很有可能是由于网络问题或者服务器问题引起的,请扫描左侧二维码加群与管理员联系</div>
48+
<h5>@Localizer["Title"]</h5>
49+
<p><b>@Localizer["ReconnectRejectedTitle"]</b></p>
50+
<div>@((MarkupString)Localizer["ReconnectRejectedDescription"].Value)</div>
5051
</div>
5152
<div class="col-12 col-sm-2">
5253
<div class="d-flex flex-column align-items-center justify-content-center h-100">
53-
<a href="javascript:location.reload()" class="btn btn-info">重新加载</a>
54+
<a href="javascript:location.reload()" class="btn btn-info">@Localizer["ReloadButton"]</a>
5455
</div>
5556
</div>
5657
</div>
@@ -63,13 +64,13 @@
6364

6465
RenderFragment RenderBootstrapBlazor =>
6566
@<div class="col-12 col-sm-5">
66-
<h5>Bootstrap Blazor UI 组件库</h5>
67+
<h5>@Localizer["UILibraryTitle"]</h5>
6768
<div class="d-flex">
6869
<div class="flex-fill">
69-
<p>一套基于 <b>Bootstrap</b> 样式的企业级 <b>Blazor UI</b> 组件库,支持 ServerWebAssembly</p>
70-
<p>适配移动端支持各种主流浏览器以及移动端,适配 <b>ABP</b>,同时支持 <b>@WebsiteOption.Value.GetTargets()</b></p>
70+
<p>@((MarkupString)Localizer["UILibraryDescription1"].Value)</p>
71+
<p>@((MarkupString)string.Format(Localizer["UILibraryDescription2"].Value, WebsiteOption.Value.GetTargets()))</p>
7172
<p></p>
72-
<div>已提供项目模板方便快速上手 <a class="connection-link" href="@TemplateUrl" target="_blank">项目模板</a></div>
73+
<div>@Localizer["TemplateText"] <a class="connection-link" href="@TemplateUrl" target="_blank">@Localizer["TemplateLink"]</a></div>
7374
</div>
7475
<img altt="QQ" src="@WebsiteOption.Value.GetAssetUrl("images/QQGroup@2x.png")" alt="QQGroup" />
7576
<div class="connection-body-tail d-none d-sm-block"></div>

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5992,5 +5992,21 @@
59925992
"NullItemText": "Not Set",
59935993
"ReadonlyColumn": "Readonly Column",
59945994
"True": "Pass"
5995+
},
5996+
"BootstrapBlazor.Server.Components.Components.BlazorReconnector": {
5997+
"Title": "Reconnector Component",
5998+
"ReconnectingTitle": "Attempting to reconnect to the server",
5999+
"ReconnectingDescription": "The server is updating to a new version, please wait a moment for service to be available, or press <kbd>F12</kbd> to open <b>Developer tools</b> and check the <b>console</b> for any error output. Please scan the QR code on the left to join the group and contact the administrator",
6000+
"ReconnectButton": "Reconnect",
6001+
"ReconnectFailedTitle": "Failed to connect to server",
6002+
"ReconnectFailedDescription": "Please confirm that your network is working properly, or press <kbd>F12</kbd> to open <b>Developer tools</b> and check the <b>console</b> for any error output. Please scan the QR code on the left to join the group and contact the administrator",
6003+
"ReloadButton": "Reload",
6004+
"ReconnectRejectedTitle": "Server rejected connection",
6005+
"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",
6006+
"UILibraryTitle": "Bootstrap Blazor UI Component Library",
6007+
"UILibraryDescription1": "An enterprise-level <b>Blazor UI</b> component library based on <b>Bootstrap</b> styles, supporting both Server and WebAssembly",
6008+
"UILibraryDescription2": "Mobile-responsive, supports all major browsers and mobile devices, compatible with <b>ABP</b>, and supports <b>{0}</b>",
6009+
"TemplateLink": "Project Templates",
6010+
"TemplateText": "Project templates are provided for quick start"
59956011
}
59966012
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5992,5 +5992,21 @@
59925992
"NullItemText": "未设置",
59935993
"ReadonlyColumn": "只读列",
59945994
"True": "通过"
5995+
},
5996+
"BootstrapBlazor.Server.Components.Components.BlazorReconnector": {
5997+
"Title": "Reconnector 组件",
5998+
"ReconnectingTitle": "正在尝试重新连接服务器",
5999+
"ReconnectingDescription": "服务器正在更新新版本,稍等一会儿即可提供服务,或者 <kbd>F12</kbd> 打开 <b>Developer tools</b> 查看 <b>控制台</b> 是否有错误输出,请扫描左侧二维码加群与管理员联系",
6000+
"ReconnectButton": "重新连接",
6001+
"ReconnectFailedTitle": "与服务器连接失败",
6002+
"ReconnectFailedDescription": "请确认网络是否正常,或者 <kbd>F12</kbd> 打开 <b>Developer tools</b> 查看 <b>控制台</b> 是否有错误输出,请扫描左侧二维码加群与管理员联系",
6003+
"ReloadButton": "重新加载",
6004+
"ReconnectRejectedTitle": "服务器拒绝连接",
6005+
"ReconnectRejectedDescription": "所有的连接尝试都被拒绝了,这很有可能是由于网络问题或者服务器问题引起的,请扫描左侧二维码加群与管理员联系",
6006+
"UILibraryTitle": "Bootstrap Blazor UI 组件库",
6007+
"UILibraryDescription1": "一套基于 <b>Bootstrap</b> 样式的企业级 <b>Blazor UI</b> 组件库,支持 Server 与 WebAssembly",
6008+
"UILibraryDescription2": "适配移动端支持各种主流浏览器以及移动端,适配 <b>ABP</b>,同时支持 <b>{0}</b>",
6009+
"TemplateLink": "项目模板",
6010+
"TemplateText": "已提供项目模板方便快速上手"
59956011
}
59966012
}

0 commit comments

Comments
 (0)