diff --git a/Data/config.db b/Data/config.db index f7167a8..56c7982 100644 Binary files a/Data/config.db and b/Data/config.db differ diff --git a/Data/deletedpages.db b/Data/deletedpages.db index a3bb072..74dc57c 100644 Binary files a/Data/deletedpages.db and b/Data/deletedpages.db differ diff --git a/Data/exceptions.db b/Data/exceptions.db index eb39341..72ecaf7 100644 Binary files a/Data/exceptions.db and b/Data/exceptions.db differ diff --git a/Data/pages.db b/Data/pages.db index 7e48477..239572a 100644 Binary files a/Data/pages.db and b/Data/pages.db differ diff --git a/Data/statistics.db b/Data/statistics.db index 467f04f..5f836cd 100644 Binary files a/Data/statistics.db and b/Data/statistics.db differ diff --git a/Data/users.db b/Data/users.db index 5c71c5e..29961ee 100644 Binary files a/Data/users.db and b/Data/users.db differ diff --git a/ZelWiki.Models/ViewModels/Admin/AccountProfileAccountViewModel.cs b/ZelWiki.Models/ViewModels/Admin/AccountProfileAccountViewModel.cs index 5a45b6d..2172172 100644 --- a/ZelWiki.Models/ViewModels/Admin/AccountProfileAccountViewModel.cs +++ b/ZelWiki.Models/ViewModels/Admin/AccountProfileAccountViewModel.cs @@ -51,6 +51,7 @@ namespace ZelWiki.Models.ViewModels.Admin public int PaginationPageSize { get; set; } public int PaginationPageCount { get; set; } + [Display(Name = "角色")] public string Role { get; set; } = string.Empty; public static AccountProfileAccountViewModel FromDataModel(AccountProfile model) diff --git a/ZelWiki.Models/ViewModels/Shared/CredentialViewModel.cs b/ZelWiki.Models/ViewModels/Shared/CredentialViewModel.cs index 911a529..2eb4766 100644 --- a/ZelWiki.Models/ViewModels/Shared/CredentialViewModel.cs +++ b/ZelWiki.Models/ViewModels/Shared/CredentialViewModel.cs @@ -7,14 +7,14 @@ namespace ZelWiki.Models.ViewModels.Shared public const string NOTSET = "\\__!!_PASSWORD_NOT_SET_!!__//"; [Required] - [Display(Name = "Password")] - [StringLength(50, MinimumLength = 6, ErrorMessage = "Must have a minimum length of 5.")] + [Display(Name = "密码")] + [StringLength(50, MinimumLength = 6, ErrorMessage = "密码必须大于6位")] public string Password { get; set; } = NOTSET; [Required] - [Display(Name = "Re-enter Password")] - [StringLength(50, MinimumLength = 6, ErrorMessage = "Must have a minimum length of 5.")] - [Compare("Password", ErrorMessage = "The two entered passwords do not match.")] + [Display(Name = "再次输入密码")] + [StringLength(50, MinimumLength = 6, ErrorMessage = "密码必须大于6位")] + [Compare("Password", ErrorMessage = "两次密码输入不一致")] public string ComparePassword { get; set; } = NOTSET; } } diff --git a/ZelWiki/Controllers/PageController.cs b/ZelWiki/Controllers/PageController.cs index 42f7fc1..3e10225 100644 --- a/ZelWiki/Controllers/PageController.cs +++ b/ZelWiki/Controllers/PageController.cs @@ -19,7 +19,10 @@ using static ZelWiki.Library.Images; namespace ZelWiki.Controllers { [Route("")] - public class PageController(IZelEngine zelEngine, SignInManager signInManager, UserManager userManager) + public class PageController( + IZelEngine zelEngine, + SignInManager signInManager, + UserManager userManager) : WikiControllerBase(signInManager, userManager) { [AllowAnonymous] @@ -76,7 +79,8 @@ namespace ZelWiki.Controllers queryKey += $"{query.Key}:{query.Value}"; } - var cacheKey = WikiCacheKeyFunction.Build(WikiCache.Category.Page, [page.Navigation, page.Revision, queryKey]); + var cacheKey = WikiCacheKeyFunction.Build(WikiCache.Category.Page, + [page.Navigation, page.Revision, queryKey]); if (WikiCache.TryGet(cacheKey, out var cached)) { model.Body = cached.Body; @@ -96,7 +100,8 @@ namespace ZelWiki.Controllers PageTitle = state.PageTitle }; - WikiCache.Put(cacheKey, toBeCached); //This is cleared with the call to Cache.ClearCategory($"Page:{page.Navigation}"); + WikiCache.Put(cacheKey, + toBeCached); //This is cleared with the call to Cache.ClearCategory($"Page:{page.Navigation}"); } } } @@ -107,7 +112,8 @@ namespace ZelWiki.Controllers model.Body = state.HtmlResult; } - if (GlobalConfiguration.EnablePageComments && GlobalConfiguration.ShowCommentsOnPageFooter && model.HideFooterComments == false) + if (GlobalConfiguration.EnablePageComments && GlobalConfiguration.ShowCommentsOnPageFooter && + model.HideFooterComments == false) { var comments = PageRepository.GetPageCommentsPaged(navigation.Canonical, 1); @@ -128,7 +134,8 @@ namespace ZelWiki.Controllers } else if (pageRevision != null) { - var notExistPageName = ConfigurationRepository.Get("Customization", "Revision Does Not Exists Page"); + var notExistPageName = + ConfigurationRepository.Get("Customization", "Revision Does Not Exists Page"); string notExistPageNavigation = NamespaceNavigation.CleanAndValidate(notExistPageName); var notExistsPage = PageRepository.GetPageRevisionByNavigation(notExistPageNavigation).EnsureNotNull(); @@ -183,7 +190,8 @@ namespace ZelWiki.Controllers { var model = new PageSearchViewModel() { - Pages = PageRepository.PageSearchPaged(Utility.SplitToTokens(searchString), GetQueryValue("page", 1)), + Pages = PageRepository.PageSearchPaged(Utility.SplitToTokens(searchString), + GetQueryValue("page", 1)), SearchString = searchString }; @@ -208,7 +216,8 @@ namespace ZelWiki.Controllers { model = new PageSearchViewModel() { - Pages = PageRepository.PageSearchPaged(Utility.SplitToTokens(searchString), GetQueryValue("page", 1)), + Pages = PageRepository.PageSearchPaged(Utility.SplitToTokens(searchString), + GetQueryValue("page", 1)), SearchString = searchString }; @@ -252,7 +261,8 @@ namespace ZelWiki.Controllers } else { - PageRepository.DeletePageCommentByUserAndId(pageInfo.Id, SessionState.Profile.EnsureNotNull().UserId, int.Parse(deleteAction)); + PageRepository.DeletePageCommentByUserAndId(pageInfo.Id, + SessionState.Profile.EnsureNotNull().UserId, int.Parse(deleteAction)); } } @@ -375,7 +385,8 @@ namespace ZelWiki.Controllers var model = new RevisionsViewModel() { - Revisions = PageRepository.GetPageRevisionsInfoByNavigationPaged(pageNavigation, pageNumber, orderBy, orderByDirection) + Revisions = PageRepository.GetPageRevisionsInfoByNavigationPaged(pageNavigation, pageNumber, orderBy, + orderByDirection) }; model.PaginationPageCount = (model.Revisions.FirstOrDefault()?.PaginationPageCount ?? 0); @@ -417,7 +428,8 @@ namespace ZelWiki.Controllers var instructions = PageRepository.GetPageProcessingInstructionsByPageId(page.EnsureNotNull().Id); if (instructions.Contains(WikiInstruction.Protect)) { - return NotifyOfError("The page is protected and cannot be deleted. A moderator or an administrator must remove the protection before deletion."); + return NotifyOfError( + "The page is protected and cannot be deleted. A moderator or an administrator must remove the protection before deletion."); } bool confirmAction = bool.Parse(GetFormValue("IsActionConfirmed").EnsureNotNull()); @@ -455,7 +467,8 @@ namespace ZelWiki.Controllers var instructions = PageRepository.GetPageProcessingInstructionsByPageId(page.Id); if (instructions.Contains(WikiInstruction.Protect)) { - return NotifyOfError("The page is protected and cannot be deleted. A moderator or an administrator must remove the protection before deletion."); + return NotifyOfError( + "The page is protected and cannot be deleted. A moderator or an administrator must remove the protection before deletion."); } return View(model); @@ -534,7 +547,8 @@ namespace ZelWiki.Controllers var instructions = PageRepository.GetPageProcessingInstructionsByPageId(page.EnsureNotNull().Id); if (SessionState.CanModerate == false && instructions.Contains(WikiInstruction.Protect)) { - return NotifyOfError("The page is protected and cannot be modified except by a moderator or an administrator unless the protection is removed."); + return NotifyOfError( + "The page is protected and cannot be modified except by a moderator or an administrator unless the protection is removed."); } SessionState.SetPageId(page.Id); @@ -552,7 +566,8 @@ namespace ZelWiki.Controllers { var pageName = GetQueryValue("Name").DefaultWhenNullOrEmpty(pageNavigation); - string templateName = ConfigurationRepository.Get("Customization", "New Page Template").EnsureNotNull(); + string templateName = ConfigurationRepository.Get("Customization", "New Page Template") + .EnsureNotNull(); string templateNavigation = NamespaceNavigation.CleanAndValidate(templateName); var templatePage = PageRepository.GetPageRevisionByNavigation(templateNavigation); @@ -611,7 +626,8 @@ namespace ZelWiki.Controllers var instructions = PageRepository.GetPageProcessingInstructionsByPageId(page.Id); if (SessionState.CanModerate == false && instructions.Contains(WikiInstruction.Protect)) { - return NotifyOfError("The page is protected and cannot be modified except by a moderator or an administrator unless the protection is removed."); + return NotifyOfError( + "The page is protected and cannot be modified except by a moderator or an administrator unless the protection is removed."); } string originalNavigation = string.Empty; @@ -626,7 +642,8 @@ namespace ZelWiki.Controllers return View(model); } - originalNavigation = page.Navigation; //So we can clear cache and this also indicates that we need to redirect to the new name. + originalNavigation = + page.Navigation; //So we can clear cache and this also indicates that we need to redirect to the new name. } page.ModifiedDate = DateTime.UtcNow; @@ -658,11 +675,11 @@ namespace ZelWiki.Controllers #region File. /// - /// Gets an image attached to a page. + /// 获取图片 /// - /// The navigation link of the page. - /// The navigation link of the file. - /// The revision of the the PAGE that the file is attached to (NOT THE FILE REVISION) + /// + /// + /// /// [HttpGet("Page/Image/{givenPageNavigation}/{givenFileNavigation}/{pageRevision:int?}")] public ActionResult Image(string givenPageNavigation, string givenFileNavigation, int? pageRevision = null) @@ -670,21 +687,22 @@ namespace ZelWiki.Controllers var pageNavigation = new NamespaceNavigation(givenPageNavigation); var fileNavigation = new NamespaceNavigation(givenFileNavigation); - string givenScale = GetQueryValue("Scale", "100"); + var givenScale = GetQueryValue("Scale", "100"); - var cacheKey = WikiCacheKeyFunction.Build(WikiCache.Category.Page, [givenPageNavigation, givenFileNavigation, pageRevision, givenScale]); + var cacheKey = WikiCacheKeyFunction.Build(WikiCache.Category.Page, + [givenPageNavigation, givenFileNavigation, pageRevision, givenScale]); if (WikiCache.TryGet(cacheKey, out var cached)) { return File(cached.Bytes, cached.ContentType); } - var file = PageFileRepository.GetPageFileAttachmentByPageNavigationPageRevisionAndFileNavigation(pageNavigation.Canonical, fileNavigation.Canonical, pageRevision); + var file = PageFileRepository.GetPageFileAttachmentByPageNavigationPageRevisionAndFileNavigation( + pageNavigation.Canonical, fileNavigation.Canonical, pageRevision); if (file != null) { if (file.ContentType == "image/x-icon") { - //We do not handle the resizing of icon file. Maybe later.... return File(file.Data, file.ContentType); } @@ -695,19 +713,18 @@ namespace ZelWiki.Controllers { parsedScale = 500; } + if (parsedScale != 100) { - int width = (int)(img.Width * (parsedScale / 100.0)); - int height = (int)(img.Height * (parsedScale / 100.0)); + var width = (int)(img.Width * (parsedScale / 100.0)); + var height = (int)(img.Height * (parsedScale / 100.0)); - //Adjusting by a ratio (and especially after applying additional scaling) may have caused one - // dimension to become very small (or even negative). So here we will check the height and width - // to ensure they are both at least n pixels and adjust both dimensions. if (height < 16) { height += 16 - height; width += 16 - height; } + if (width < 16) { height += 16 - width; @@ -741,11 +758,11 @@ namespace ZelWiki.Controllers } /// - /// Gets an image from the database, converts it to a PNG with optional scaling and returns it to the client. + /// PNG /// - /// The navigation link of the page. - /// The navigation link of the file. - /// The revision of the the PAGE that the file is attached to (NOT THE FILE REVISION) + /// + /// + /// /// [AllowAnonymous] [HttpGet("Page/Png/{givenPageNavigation}/{givenFileNavigation}/{pageRevision:int?}")] @@ -756,14 +773,15 @@ namespace ZelWiki.Controllers var pageNavigation = new NamespaceNavigation(givenPageNavigation); var fileNavigation = new NamespaceNavigation(givenFileNavigation); - string givenScale = GetQueryValue("Scale", "100"); + var givenScale = GetQueryValue("Scale", "100"); - var file = PageFileRepository.GetPageFileAttachmentByPageNavigationPageRevisionAndFileNavigation(pageNavigation.Canonical, fileNavigation.Canonical, pageRevision); + var file = PageFileRepository.GetPageFileAttachmentByPageNavigationPageRevisionAndFileNavigation( + pageNavigation.Canonical, fileNavigation.Canonical, pageRevision); if (file != null) { var img = SixLabors.ImageSharp.Image.Load(new MemoryStream(Utility.Decompress(file.Data))); - int parsedScale = int.Parse(givenScale); + var parsedScale = int.Parse(givenScale); if (parsedScale > 500) { parsedScale = 500; @@ -771,17 +789,15 @@ namespace ZelWiki.Controllers if (parsedScale != 100) { - int width = (int)(img.Width * (parsedScale / 100.0)); - int height = (int)(img.Height * (parsedScale / 100.0)); + var width = (int)(img.Width * (parsedScale / 100.0)); + var height = (int)(img.Height * (parsedScale / 100.0)); - //Adjusting by a ratio (and especially after applying additional scaling) may have caused one - // dimension to become very small (or even negative). So here we will check the height and width - // to ensure they are both at least n pixels and adjust both dimensions. if (height < 16) { height += 16 - height; width += 16 - height; } + if (width < 16) { height += 16 - width; @@ -807,11 +823,12 @@ namespace ZelWiki.Controllers } /// - /// Gets a file from the database and returns it to the client. - /// The navigation link of the page. - /// The navigation link of the file. - /// The revision of the the PAGE that the file is attached to (NOT THE FILE REVISION) + /// 二进制 /// + /// + /// + /// + /// [AllowAnonymous] [HttpGet("Page/Binary/{givenPageNavigation}/{givenFileNavigation}/{pageRevision:int?}")] public ActionResult Binary(string givenPageNavigation, string givenFileNavigation, int? pageRevision = null) @@ -821,7 +838,8 @@ namespace ZelWiki.Controllers var pageNavigation = new NamespaceNavigation(givenPageNavigation); var fileNavigation = new NamespaceNavigation(givenFileNavigation); - var file = PageFileRepository.GetPageFileAttachmentByPageNavigationPageRevisionAndFileNavigation(pageNavigation.Canonical, fileNavigation.Canonical, pageRevision); + var file = PageFileRepository.GetPageFileAttachmentByPageNavigationPageRevisionAndFileNavigation( + pageNavigation.Canonical, fileNavigation.Canonical, pageRevision); if (file != null) { @@ -836,4 +854,4 @@ namespace ZelWiki.Controllers #endregion } -} +} \ No newline at end of file diff --git a/ZelWiki/Views/Admin/Database.cshtml b/ZelWiki/Views/Admin/Database.cshtml index ecf5e75..a391edd 100644 --- a/ZelWiki/Views/Admin/Database.cshtml +++ b/ZelWiki/Views/Admin/Database.cshtml @@ -6,11 +6,10 @@ }

- Database + 数据库

- Various utilities to assist in management of the SQLite database.

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) @@ -42,14 +41,14 @@ @NTDLS.Helpers.Formatters.FileSize((long)info.DatabaseSize) @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateSafeLink(GlobalConfiguration.BasePath, - "This will optimize the database indexes and structure. Continue?", - "Optimize", $"/Admin/Database/Optimize/{info.Name}", Context.Request.Path.Value)) + "即将优化数据库索引和结构,继续?", + "优化", $"/Admin/Database/Optimize/{info.Name}", Context.Request.Path.Value)) @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateSafeLink(GlobalConfiguration.BasePath, - "This will remove empty space from the database, which can free space if a lot of data has been deleted. Continue?", - "Vacuum", $"/Admin/Database/Vacuum/{info.Name}", Context.Request.Path.Value)) + "即将从数据库中删除空白空间,如果删除了大量数据,则可以释放空间,继续吗?", + "真空化", $"/Admin/Database/Vacuum/{info.Name}", Context.Request.Path.Value)) @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateSafeLink(GlobalConfiguration.BasePath, - "This will check the database integrity and validate all foreign keys. Continue?", - "Verify", $"/Admin/Database/Verify/{info.Name}", Context.Request.Path.Value)) + "即将检查数据库的完整性并验证所有外键,继续吗?", + "校验", $"/Admin/Database/Verify/{info.Name}", Context.Request.Path.Value)) } diff --git a/ZelWiki/Views/Admin/DeletedPage.cshtml b/ZelWiki/Views/Admin/DeletedPage.cshtml index 1bba213..322471c 100644 --- a/ZelWiki/Views/Admin/DeletedPage.cshtml +++ b/ZelWiki/Views/Admin/DeletedPage.cshtml @@ -7,15 +7,15 @@
- Viewing a deleted page + 正在浏览一个已删除的页面

- You are viewing a page which was deleted on @Model.DeletedDate by @Model.DeletedByUserName.
+ 您正在浏览的页面于 @Model.DeletedDate 被 @Model.DeletedByUserName 删除
@Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateWarnLink(GlobalConfiguration.BasePath, - "This will restore the deleted page and all of its history. Continue?", - "Restore This Page", "/Admin/RestoreDeletedPage/" + @Model.PageId, "/Admin/DeletedPages", Context.Request.Path.Value)) + "这将恢复已删除的页面及其所有修订历史,继续吗?", + "恢复这个页面", "/Admin/RestoreDeletedPage/" + @Model.PageId, "/Admin/DeletedPages", Context.Request.Path.Value))

diff --git a/ZelWiki/Views/Admin/DeletedPageRevision.cshtml b/ZelWiki/Views/Admin/DeletedPageRevision.cshtml index 31ebd69..cd9aeb5 100644 --- a/ZelWiki/Views/Admin/DeletedPageRevision.cshtml +++ b/ZelWiki/Views/Admin/DeletedPageRevision.cshtml @@ -7,15 +7,15 @@
- Viewing a deleted page revision + 查看已删除的页面修订

- You are viewing a page revision which was deleted on @Model.DeletedDate by @Model.DeletedByUserName.
+ 您正在查看于 @Model.DeletedDate 被 @Model.DeletedByUserName 删除的页面修订
@Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateWarnLink(GlobalConfiguration.BasePath, - "This will restore the deleted page and all of its history. Continue?", - "Restore This Revision", $"/Admin/RestoreDeletedPageRevision/{Model.PageId}/{Model.Revision}", "/Admin/DeletedPageRevisions", Context.Request.Path.Value)) + "这将还原已删除的页面及其所有历史记录,继续?", + "恢复", $"/Admin/RestoreDeletedPageRevision/{Model.PageId}/{Model.Revision}", "/Admin/DeletedPageRevisions", Context.Request.Path.Value))

diff --git a/ZelWiki/Views/Admin/DeletedPageRevisions.cshtml b/ZelWiki/Views/Admin/DeletedPageRevisions.cshtml index 222f4b7..99b8de8 100644 --- a/ZelWiki/Views/Admin/DeletedPageRevisions.cshtml +++ b/ZelWiki/Views/Admin/DeletedPageRevisions.cshtml @@ -7,11 +7,11 @@ }

- Deleted Page Revisions + 删除页面修订

- Page revision that have been deleted for the given page. These can be purged or restored.

+

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) @@ -24,8 +24,8 @@ } @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, - $"This will permanently purge all deleted pages revisions for \"{Model.Name}\". Continue?", - "Purge Deleted Revisions", $"/Admin/PurgeDeletedPageRevisions/{Model.PageId}", Context.Request.Path.Value)) + $"这将永久清除 \"{Model.Name}\" 所有已删除的页面修订 继续吗?", + "清除所有修订", $"/Admin/PurgeDeletedPageRevisions/{Model.PageId}", Context.Request.Path.Value))

@@ -36,9 +36,9 @@ - - - + + + @@ -53,12 +53,12 @@ } diff --git a/ZelWiki/Views/Admin/DeletedPages.cshtml b/ZelWiki/Views/Admin/DeletedPages.cshtml index c202222..71c5a58 100644 --- a/ZelWiki/Views/Admin/DeletedPages.cshtml +++ b/ZelWiki/Views/Admin/DeletedPages.cshtml @@ -7,11 +7,11 @@ }

- Deleted Pages + 被删除页面

- Pages that have been deleted. Can be purged or restored.

+

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) @@ -24,8 +24,8 @@ } @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, - "This will permanently purge all deleted pages. Continue?", - "Purge Deleted Pages", "/Admin/PurgeDeletedPages", Context.Request.Path.Value)) + "这将永久清除所有已删除的页面,确定吗?", + "清除已删除的页面", "/Admin/PurgeDeletedPages", Context.Request.Path.Value))

@@ -46,8 +46,8 @@
RevisionDeleted DateDeleted By修订删除时间删除人 Action
@p.DeletedByUserName @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateSafeLink(GlobalConfiguration.BasePath, - "This will restore the deleted page and all of its history. Continue?", - "Restore", $"/Admin/RestoreDeletedPageRevision/{p.Id}/{p.Revision}", Context.Request.Path.Value)) + "这将恢复已删除的页面及其所有历史记录,继续?", + "恢复", $"/Admin/RestoreDeletedPageRevision/{p.Id}/{p.Revision}", Context.Request.Path.Value)) @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, - "This will permanently delete the specified page, all revisions and attachments. Continue?", - "Purge", $"/Admin/PurgeDeletedPageRevision/{p.Id}/{p.Revision}", Context.Request.Path.Value)) + "这将永久删除指定的页面、所有修订和附件,继续?", + "删除", $"/Admin/PurgeDeletedPageRevision/{p.Id}/{p.Revision}", Context.Request.Path.Value))
- - + + @foreach (var p in Model.Pages) @@ -61,11 +61,11 @@ } @@ -77,7 +77,7 @@ {
- Either the deleted pages queue is empty or your search criteria returned no results. + 暂无数据.
} diff --git a/ZelWiki/Views/Admin/Namespace.cshtml b/ZelWiki/Views/Admin/Namespace.cshtml index 5956238..9ca1951 100644 --- a/ZelWiki/Views/Admin/Namespace.cshtml +++ b/ZelWiki/Views/Admin/Namespace.cshtml @@ -7,11 +7,11 @@ }

- Namespace + 命名空间

- All pages contained in the namespace.

+

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) @@ -28,10 +28,10 @@
PageAction页面操作
@Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateSafeLink(GlobalConfiguration.BasePath, - "This will restore the deleted page and all of its history. Continue?", - "Restore", "/Admin/RestoreDeletedPage/" + @p.Id, Context.Request.Path.Value)) + "这将恢复已删除的页面及其所有历史记录,继续吗?", + "恢复", "/Admin/RestoreDeletedPage/" + @p.Id, Context.Request.Path.Value)) @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, - "This will permanently delete the specified page, all revisions and attachments. Continue?", - "Purge", "/Admin/PurgeDeletedPage/" + @p.Id, Context.Request.Path.Value)) + "这将永久删除指定的页面、所有修订和附件,继续吗?", + "清除", "/Admin/PurgeDeletedPage/" + @p.Id, Context.Request.Path.Value))
- - - - + + + + diff --git a/ZelWiki/Views/Admin/Namespaces.cshtml b/ZelWiki/Views/Admin/Namespaces.cshtml index ef41d28..9dc0c26 100644 --- a/ZelWiki/Views/Admin/Namespaces.cshtml +++ b/ZelWiki/Views/Admin/Namespaces.cshtml @@ -7,11 +7,11 @@ }

- Namespaces + 命名空间

- All namespaces contained in the wiki.

+

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) @@ -29,16 +29,19 @@ {
NameRevisionModified ByModified Date名称修订上次一修改人上一次修改时间
- - - - + + + + @foreach (var p in Model.Namespaces) { - + } @@ -50,7 +53,7 @@ {
- There are currently no pages which exist within namespaces. + 暂无数据
} diff --git a/ZelWiki/Views/Admin/OrphanedPageAttachments.cshtml b/ZelWiki/Views/Admin/OrphanedPageAttachments.cshtml index e9810b9..c173dee 100644 --- a/ZelWiki/Views/Admin/OrphanedPageAttachments.cshtml +++ b/ZelWiki/Views/Admin/OrphanedPageAttachments.cshtml @@ -7,11 +7,11 @@ }

- Orphaned Page Attachments + 孤立页附件

- These are all of the page attachments that are no longer attached to any page revision.

+ 这些是不再附加到任何页面修订的所有页面附件

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) @@ -24,8 +24,8 @@ } @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, - "This will permanently purge all orphaned page attachments. Continue?", - "Purge Orphaned Attachments", "/Admin/PurgeOrphanedAttachments", Context.Request.Path.Value)) + "这将永久清除所有孤立的页面附件,继续吗?", + "清除所有孤立附件", "/Admin/PurgeOrphanedAttachments", Context.Request.Path.Value))

@@ -35,10 +35,10 @@ {
NamePages
命名包含页数 +
@(string.IsNullOrEmpty(p.Namespace) ? "(Default)" : p.Namespace) + @(string.IsNullOrEmpty(p.Namespace) ? "(Default)" : p.Namespace) + @p.CountOfPages.ToString("N0")
- - - - + + + + @@ -56,8 +56,8 @@ } diff --git a/ZelWiki/Views/Admin/PageRevisions.cshtml b/ZelWiki/Views/Admin/PageRevisions.cshtml index b27358e..7b18111 100644 --- a/ZelWiki/Views/Admin/PageRevisions.cshtml +++ b/ZelWiki/Views/Admin/PageRevisions.cshtml @@ -7,11 +7,11 @@ }

- Page revisions for @sessionState.Page.Name. + 关于页面 @sessionState.Page.Name 的修订

- All changes that have been made to the page.

+

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) @@ -30,11 +30,11 @@
PageFileSizeRevision页面文件大小修订 Action
@p.FileRevision @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, - "This will permanently delete the specified attachment. Continue?", - "Delete", $"/Admin/PurgeOrphanedAttachment/{@p.PageFileId}/{@p.FileRevision}", Context.Request.Path.Value)) + "这将永久清除这个附件,继续吗?", + "删除", $"/Admin/PurgeOrphanedAttachment/{@p.PageFileId}/{@p.FileRevision}", Context.Request.Path.Value))
- - - - - + + + + + @@ -48,14 +48,14 @@ } diff --git a/ZelWiki/Views/File/Revisions.cshtml b/ZelWiki/Views/File/Revisions.cshtml index 73caa90..40bf221 100644 --- a/ZelWiki/Views/File/Revisions.cshtml +++ b/ZelWiki/Views/File/Revisions.cshtml @@ -6,11 +6,11 @@ }

- Page File Revisions + 页面附件修订

- All changes that have been made to the attached file.

+

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) @@ -27,10 +27,10 @@
RevisionModified ByModified DateSummaryAction修订好修改人修改日期摘要操作
@Html.DisplayTextFor(x => h.ChangeSummary) @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateWarnLink(GlobalConfiguration.BasePath, - $"Reverting {h.Name} from revision {h.HighestRevision} to {h.Revision} will rollback {h.HigherRevisionCount} changes.
" - + "Reverting does not mean that changes will be lost however, the revert process will create a new revision with the reverted changes.

" - + "Are you sure you want to continue?

", - "Revert", $"/Admin/RevertPageRevision/{h.Navigation}/{h.Revision}", Context.Request.Path.Value)) + $"将{h.Name} 从 {h.HighestRevision} 回滚至 {h.Revision} 将会 {h.HigherRevisionCount} 个更改
" + + "还原并不意味着更改将丢失,但是还原过程将使用还原的更改创建新的修订.

" + + "继续吗?", + "回滚", $"/Admin/RevertPageRevision/{h.Navigation}/{h.Revision}", Context.Request.Path.Value)) @Html.Raw(ZelWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, - $"Deleting revision {h.Revision} of \"{h.Name}\" will move the page revision to the deletion queue. This action can only be undone by an administrator or moderator. Continue?", - "Delete", $"/Admin/DeletePageRevision/{h.Navigation}/{h.Revision}", Context.Request.Path.Value)) + $"把 {h.Revision} 从 \"{h.Name}\" 的修订记录中删除,继续吗?", + "删除", $"/Admin/DeletePageRevision/{h.Navigation}/{h.Revision}", Context.Request.Path.Value))
- - - - + + + + diff --git a/ZelWiki/Views/Page/Comments.cshtml b/ZelWiki/Views/Page/Comments.cshtml index 36e93d3..a3da613 100644 --- a/ZelWiki/Views/Page/Comments.cshtml +++ b/ZelWiki/Views/Page/Comments.cshtml @@ -30,9 +30,9 @@
- +
- +
} @@ -63,7 +63,7 @@ @if (sessionState.CanModerate == true || h.UserId == sessionState.Profile?.UserId) { - Delete + 删除 } diff --git a/ZelWiki/Views/Page/Display.cshtml b/ZelWiki/Views/Page/Display.cshtml index d5fb52e..2ecba73 100644 --- a/ZelWiki/Views/Page/Display.cshtml +++ b/ZelWiki/Views/Page/Display.cshtml @@ -31,7 +31,7 @@
if (ZelWiki.Models.GlobalConfiguration.EnablePublicProfiles) { - Last modified by @Model.ModifiedByUserName @@ @Model.ModifiedDate + @Model.ModifiedByUserName @@修改于 @Model.ModifiedDate } else { @@ -55,9 +55,9 @@
- +
- +
@@ -83,7 +83,7 @@ @if (sessionState.CanModerate == true || h.UserId == sessionState.Profile?.UserId) { - Delete + 删除 } @@ -92,6 +92,6 @@ } @if (ZelWiki.Models.GlobalConfiguration.EnablePageComments && ZelWiki.Models.GlobalConfiguration.ShowCommentsOnPageFooter) { - View all comments + 查看所有评论 } } diff --git a/solution/功能需求分析.vsdx b/solution/功能需求分析.vsdx index 31c57bd..f9c12a1 100644 Binary files a/solution/功能需求分析.vsdx and b/solution/功能需求分析.vsdx differ diff --git a/solution/论文.docx b/solution/论文.docx index 7a194f8..c70a02b 100644 Binary files a/solution/论文.docx and b/solution/论文.docx differ
RevisionModified ByModified DateSummary修订修订人修订时间摘要