汉化部分

This commit is contained in:
Zel
2025-02-04 15:14:07 +08:00
parent 9c3a099733
commit 1d6cd9abbb
10 changed files with 70 additions and 76 deletions

View File

@@ -13,12 +13,12 @@
<div asp-validation-summary="ModelOnly" class="text-danger" role="alert"></div>
<div class="form-floating mb-3">
<input asp-for="Input.Email" class="form-control" autocomplete="username" aria-required="true" placeholder="name@example.com" />
<label asp-for="Input.Email" class="form-label">Email</label>
<label asp-for="Input.Email" class="form-label">邮箱</label>
<span asp-validation-for="Input.Email" class="text-danger"></span>
</div>
<div class="form-floating mb-3">
<input asp-for="Input.Password" class="form-control" autocomplete="current-password" aria-required="true" placeholder="password" />
<label asp-for="Input.Password" class="form-label">Password</label>
<label asp-for="Input.Password" class="form-label">密码</label>
<span asp-validation-for="Input.Password" class="text-danger"></span>
</div>
<div class="checkbox mb-3">
@@ -28,19 +28,13 @@
</label>
</div>
<div>
<button id="login-submit" type="submit" class="w-100 btn btn-lg btn-primary">Log in</button>
<button id="login-submit" type="submit" class="w-100 btn btn-lg btn-primary">登 录</button>
<br />
</div>
<div>
<p>
<a id="forgot-password" asp-page="./ForgotPassword">Forgot your password?</a>
<a id="forgot-password" asp-page="./ForgotPassword">忘记密码?</a>
<br />
@if (TightWiki.Models.GlobalConfiguration.AllowSignup == true)
{
<a asp-page="./Register" asp-route-returnUrl="@UrlEncoder.Default.Encode(Model.ReturnUrl)">Register as a new user</a>
<br />
}
<a id="resend-confirmation" asp-page="./ResendEmailConfirmation">Resend email confirmation</a>
<br />
</p>
</div>

View File

@@ -6,7 +6,7 @@
<div class="card">
<div class="card-header">
<h3>Account Email Verification</h3>
<h3>帐户电子邮件验证</h3>
</div>
<div class="card-body">
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
@@ -19,8 +19,8 @@
}
<p>
Already a member? <a href="@GlobalConfiguration.BasePath/Account/Login">Login</a>.<br />
Forgot your password? @Html.ActionLink("Reset it.", "Forgot", "Account").<br />
已有账号? <a href="@GlobalConfiguration.BasePath/Account/Login">登录</a>.<br />
忘记密码? @Html.ActionLink("Reset it.", "Forgot", "Account").<br />
</p>
</div>
</div>

View File

@@ -19,18 +19,18 @@
{
<div class="card border-danger mb-3">
<div class="card-header bg-danger text-white">
<strong>Delete account "@Model.AccountName"?</strong>
<strong>删除账号 "@Model.AccountName"?</strong>
</div>
<div class="card-body">
Deleting "@Model.AccountName" will permanently remove the account. All pages created or modified by this user will be attributed to a stand-in account.
<strong>You will not be able to revert this action. </strong>
账号 "@Model.AccountName" 将永远删除。此用户创建或修改的所有页面都将归属于一个代理帐户.
<strong>您将无法恢复此操作。</strong>
<br /><br />
Are you sure you want to continue with this deletion?<br /><br />
确认继续吗?<br /><br />
@using (Html.BeginForm(null, null, FormMethod.Post, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" }))
{
<div class="form-group"><button type="submit" class="btn btn-danger rounded-0" name="IsActionConfirmed" value="true">Yes</button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="IsActionConfirmed" value="false">No</button></div>
<div class="form-group"><button type="submit" class="btn btn-danger rounded-0" name="IsActionConfirmed" value="true"></button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="IsActionConfirmed" value="false"></button></div>
}
</div>
</div>

View File

@@ -7,17 +7,17 @@
<div class="card border-danger mb-3">
<div class="card-header bg-danger text-white">
<strong>Account Deleted!</strong>
<strong>账号已删除!</strong>
</div>
<div class="card-body">
The account has been deleted and all content that was created or modified by this account has been attributed to an anonymized profile..<br /><br />
该帐户已被删除,此帐户创建或修改的所有内容均已归因于匿名配置文件。<br /><br />
<br /><br />
@if (TightWiki.Models.GlobalConfiguration.AllowSignup == true)
{
@:Not a member? <a href="@GlobalConfiguration.BasePath/Identity/Account/Register">Register as a new user</a>.<br />
@:没有账号? <a href="@GlobalConfiguration.BasePath/Identity/Account/Register">注册新账号</a><br />
}
Already a member? <a href="@GlobalConfiguration.BasePath/Identity/Account/Login">Login</a>.<br />
已有账号? <a href="@GlobalConfiguration.BasePath/Identity/Account/Login">登录</a><br />
</div>
</div>

View File

@@ -5,12 +5,12 @@
}
<h3>
Profile
简介
</h3>
<p>
@* <p>
This is your profile, do with it what you may.<br /><br />
</p>
</p> *@
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
{
@@ -31,7 +31,7 @@
@Html.HiddenFor(m => m.AccountProfile.Navigation)
<div class="form-group row mb-1">
<label for="Avatar" class="col-sm-2 col-form-label"><strong>Avatar</strong></label>
<label for="Avatar" class="col-sm-2 col-form-label"><strong>头像</strong></label>
<div class="col-sm-10">
@if (@Model.AccountProfile.Navigation != "")
{
@@ -110,7 +110,7 @@
<label for="Theme" class="col-sm-2 col-form-label"><strong>@Html.LabelFor(m => m.AccountProfile.Theme)</strong></label>
<div class="col-sm-10">
<select name="AccountProfile.Theme" id="AccountProfile.Theme" class="form-control">
<option value="">System Default</option>
<option value="">默认主题</option>
@foreach (var item in Model.Themes)
{
<option value="@item.Name" selected=@(Model.AccountProfile.Theme == item.Name ? "selected" : null)>
@@ -130,7 +130,7 @@
<label for="Country" class="col-sm-2 col-form-label"><strong>@Html.LabelFor(m => m.AccountProfile.Country)</strong></label>
<div class="col-sm-10">
<select name="AccountProfile.Country" id="AccountProfile.Country" class="form-control">
<option value="" style="color:#ccc !important;">Select a country</option>
<option value="" style="color:#ccc !important;">选择一个国家</option>
@foreach (var item in Model.Countries)
{
<option value="@item.Value" selected=@(Model.AccountProfile.Country == item.Value ? "selected" : null)>
@@ -150,7 +150,7 @@
<label for="Language" class="col-sm-2 col-form-label"><strong>@Html.LabelFor(m => m.AccountProfile.Language)</strong></label>
<div class="col-sm-10">
<select name="AccountProfile.Language" id="AccountProfile.Language" class="form-control">
<option value="" style="color:#ccc !important;">Select a language</option>
<option value="" style="color:#ccc !important;">选择一种语言</option>
@foreach (var item in Model.Languages)
{
<option value="@item.Value" selected=@(Model.AccountProfile.Language == item.Value ? "selected" : null)>
@@ -195,7 +195,7 @@
<div class="form-group row mb-1">
<div class="col-sm-10 offset-sm-2">
<button type="submit" class="btn btn-primary rounded-0">Save!</button>
<button type="submit" class="btn btn-primary rounded-0">保存</button>
</div>
</div>
</form>

View File

@@ -5,7 +5,7 @@
<div class="card">
<div class="card-header">
<h3>External Login Exception</h3>
<h3>外部登录异常</h3>
</div>
<div class="card-body">
<div class="alert alert-danger">@Html.Raw(Model.ErrorMessage)</div>

View File

@@ -7,7 +7,7 @@
}
<!DOCTYPE html>
<html lang="en">
<html lang="zh">
<head>
<meta charset="utf-8">
@@ -103,7 +103,7 @@
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Page/Create">Create "@sessionState.PageNavigation"</a>
}
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Page/Create">Create new page</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Page/Create">新建页面</a>
}
@if (sessionState.Page.Exists == true)
@@ -114,31 +114,31 @@
}
if (sessionState.CanView == true && TightWiki.Models.GlobalConfiguration.EnablePageComments)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Comments">Comments</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Comments">评论</a>
}
if (sessionState.CanDelete == true)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Delete">Delete this page</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Delete">删除 this page</a>
}
if (sessionState.CanEdit == true && sessionState.Page.IsHistoricalVersion == false)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Edit">Edit</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Edit">编辑</a>
}
if (sessionState.CanView == true)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Revisions">Revisions</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Revisions">修订</a>
}
if (sessionState.CanCreate == true)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Refresh">Refresh</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/Refresh">刷新</a>
}
if (sessionState.CanModerate == true && sessionState.Page.IsHistoricalVersion == true)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/revert/@sessionState.Page.Revision">Revert to revision @sessionState.Page.Revision</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation/revert/@sessionState.Page.Revision">恢复至 @sessionState.Page.Revision</a>
}
if (sessionState.CanView == true && TightWiki.Models.GlobalConfiguration.EnablePageComments)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation">View</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/@sessionState.PageNavigation">浏览</a>
}
}
</div>
@@ -152,32 +152,32 @@
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
@if (sessionState.Role == TightWiki.Library.Constants.Roles.Administrator)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Accounts">Accounts</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Roles">Roles</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Accounts">账号</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Roles">角色</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Config">Configuration</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Config">配置</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Emojis">Emojis</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/MenuItems">Site Menu</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/MenuItems">站点菜单</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/CompilationStatistics">Compilations</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Database">Database</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Exceptions">Exceptions</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Metrics">Metrics</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/CompilationStatistics">计算</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Database">数据库</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Exceptions">异常</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Metrics">指标</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/DeletedPages">Deleted Pages</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/MissingPages">Missing Pages</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Moderate">Moderate</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Namespaces">Namespaces</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/OrphanedPageAttachments">Orphaned Attachments</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Pages">Pages</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/DeletedPages">删除页面</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/MissingPages">丢失页</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Moderate">页面说明</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Namespaces">命名空间</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/OrphanedPageAttachments">独立附件</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Pages">页面</a>
}
else if (sessionState.CanModerate == true)
{
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/DeletedPages">Deleted Pages</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/MissingPages">Missing Pages</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Moderate">Moderate</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Namespaces">Namespaces</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Pages">Pages</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/DeletedPages">删除页面</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/MissingPages">丢失页</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Moderate">页面说明</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Namespaces">命名空间</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Admin/Pages">页面</a>
}
</div>
</li>
@@ -186,19 +186,19 @@
@if (sessionState.IsAuthenticated == true)
{
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-dark" href="#" id="navbarDropdownMenuLink" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">My</a>
<a class="nav-link dropdown-toggle text-dark" href="#" id="navbarDropdownMenuLink" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">我的</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Profile/My">Profile</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Identity/Account/Manage">Account</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Profile/My">个人信息</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Identity/Account/Manage">账号</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Identity/Account/Logout?returnUrl=/">Logout</a>
<a class="dropdown-item text-dark" href="@GlobalConfiguration.BasePath/Identity/Account/Logout?returnUrl=/">登出</a>
</div>
</li>
}
@if (sessionState.IsAuthenticated == false)
{
<li class="nav-item"><a class="nav-link text-dark" href="@GlobalConfiguration.BasePath/Identity/Account/Login?returnUrl=@UrlEncoder.Default.Encode($"{GlobalConfiguration.BasePath}{Context.Request.Path.Value}")">Login</a></li>
<li class="nav-item"><a class="nav-link text-dark" href="@GlobalConfiguration.BasePath/Identity/Account/Login?returnUrl=@UrlEncoder.Default.Encode($"{GlobalConfiguration.BasePath}{Context.Request.Path.Value}")">登录</a></li>
}
@if (TightWiki.Models.GlobalConfiguration.IncludeSearchOnNavbar)
@@ -206,8 +206,8 @@
<li class="nav-item ms-auto d-none d-lg-block">
<div class="collapse navbar-collapse justify-content-end">
<form class="d-flex" role="search" method="GET" action="@GlobalConfiguration.BasePath/Page/Search">
<input class="form-control me-2" type="search" placeholder="Search" name="SearchString" aria-label="Search">
<button class="btn btn-outline-primary" type="submit">Search</button>
<input class="form-control me-2" type="search" placeholder="搜索" name="SearchString" aria-label="Search">
<button class="btn btn-outline-primary" type="submit">search</button>
</form>
</div>
</li>
@@ -228,9 +228,9 @@
<div class="card-header"><strong>Default password has not been changed</strong></div>
<div class="card-body">
<p class="card-text">
The admin password is set to its default value, it is <i>recommended</i> that you change it immediately!<br />
管理密码为默认值,<i>建议</i> 您立即更换!<br />
<br />
You can change this password by logging in, navigating to My -&gt; Account -&gt; Password.<br />
您可以登录账号后, 导航至 “我的” -&gt; “账号” -&gt; “密码”来更换密码<br />
<br />
<strong>Current admin login:</strong><br />
&nbsp;&nbsp;&nbsp;<strong>Username:</strong>"admin@tightwiki.com"<br />

View File

@@ -5,11 +5,11 @@
}
<div class="card">
<div class="card-header"><strong>Associated Tags</strong></div>
<div class="card-header"><strong>关联 Tags</strong></div>
<div class="card-body">@Html.Raw(Model.TagCloud)</div>
</div>
<div class="card">
<div class="card-header"><strong>Associated Pages</strong></div>
<div class="card-header"><strong>关联 页面</strong></div>
<div class="card-body">@Html.Raw(Model.AssociatedPages)</div>
</div>

View File

@@ -29,7 +29,7 @@
<div class="@cardClass">
<div class="@cardHeaderClass">
<strong>Are you sure?</strong>
<strong>Are you sure???</strong>
</div>
<div class="card-body">
@@ -43,15 +43,15 @@
@if (Model.Style == "Safe")
{
<div class="form-group"><button type="submit" class="btn btn-success rounded-0" name="UserSelection" value="true">Yes</button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="UserSelection" value="false">No</button></div>
<div class="form-group"><button type="submit" class="btn btn-success rounded-0" name="UserSelection" value="true"></button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="UserSelection" value="false"></button></div>
}
else if (Model.Style == "Warn")
{
<div class="form-group"><button type="submit" class="btn btn-warning rounded-0" name="UserSelection" value="true">Yes</button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="UserSelection" value="false">No</button></div>
<div class="form-group"><button type="submit" class="btn btn-warning rounded-0" name="UserSelection" value="true"></button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="UserSelection" value="false"></button></div>
}
else
{
<div class="form-group"><button type="submit" class="btn btn-danger rounded-0" name="UserSelection" value="true">Yes</button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="UserSelection" value="false">No</button></div>
<div class="form-group"><button type="submit" class="btn btn-danger rounded-0" name="UserSelection" value="true"></button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="UserSelection" value="false"></button></div>
}
</form>
</div>

View File

@@ -52,7 +52,7 @@
@if (string.IsNullOrEmpty(@Model.RedirectURL) == false)
{
<br />
<a href="@Model.RedirectURL">Continue</a>
<a href="@Model.RedirectURL">继续</a>
}
</div>
}
@@ -84,7 +84,7 @@
@if (string.IsNullOrEmpty(@Model.RedirectURL) == false && Model.RedirectTimeout > 0)
{
<p>
<a href="@Model.RedirectURL">Continue now</a> or you will be redirected in <span id="countdown">@Model.RedirectTimeout</span> seconds.
<a href="@Model.RedirectURL">继续</a> 或者即将跳转至 <span id="countdown">@Model.RedirectTimeout</span> seconds.
</p>
}
</div>