From e1b02ee405f57d88c1a65a53e7514fe44e0c81d5 Mon Sep 17 00:00:00 2001 From: hishamco Date: Fri, 20 Nov 2020 00:53:55 +0300 Subject: [PATCH 1/2] Localize components for the logs pages --- Oqtane.Client/Modules/Admin/Logs/Detail.razor | 30 +++++++++---------- Oqtane.Client/Modules/Admin/Logs/Index.razor | 4 +-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Logs/Detail.razor b/Oqtane.Client/Modules/Admin/Logs/Detail.razor index 1baac265..03c0d629 100644 --- a/Oqtane.Client/Modules/Admin/Logs/Detail.razor +++ b/Oqtane.Client/Modules/Admin/Logs/Detail.razor @@ -1,4 +1,4 @@ -@namespace Oqtane.Modules.Admin.Logs +@namespace Oqtane.Modules.Admin.Logs @using System.Globalization @inherits ModuleBase @inject NavigationManager NavigationManager @@ -10,7 +10,7 @@ - + From db6e550c86cddbc701e77a644ddfc93a14eb5495 Mon Sep 17 00:00:00 2001 From: hishamco Date: Fri, 20 Nov 2020 00:56:37 +0300 Subject: [PATCH 2/2] Localize non components for the logs pages --- Oqtane.Client/Modules/Admin/Logs/Detail.razor | 215 +++++++++--------- Oqtane.Client/Modules/Admin/Logs/Index.razor | 33 +-- 2 files changed, 125 insertions(+), 123 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Logs/Detail.razor b/Oqtane.Client/Modules/Admin/Logs/Detail.razor index 03c0d629..7c2c1303 100644 --- a/Oqtane.Client/Modules/Admin/Logs/Detail.razor +++ b/Oqtane.Client/Modules/Admin/Logs/Detail.razor @@ -6,134 +6,135 @@ @inject IPageService PageService @inject IPageModuleService PageModuleService @inject IUserService UserService +@inject IStringLocalizer Localizer -
- + @@ -18,7 +18,7 @@
- + @@ -26,7 +26,7 @@
- + @@ -34,7 +34,7 @@
- + @@ -42,7 +42,7 @@
- + @@ -52,7 +52,7 @@ {
- + @@ -63,7 +63,7 @@ {
- + @@ -74,7 +74,7 @@ {
- + @@ -83,7 +83,7 @@ }
- + @@ -91,7 +91,7 @@
- + @@ -99,7 +99,7 @@
- + @@ -109,7 +109,7 @@ {
- + @@ -118,7 +118,7 @@ }
- + @@ -126,7 +126,7 @@
- + diff --git a/Oqtane.Client/Modules/Admin/Logs/Index.razor b/Oqtane.Client/Modules/Admin/Logs/Index.razor index 3fcb0fb5..f4ae994e 100644 --- a/Oqtane.Client/Modules/Admin/Logs/Index.razor +++ b/Oqtane.Client/Modules/Admin/Logs/Index.razor @@ -1,4 +1,4 @@ -@namespace Oqtane.Modules.Admin.Logs +@namespace Oqtane.Modules.Admin.Logs @inherits ModuleBase @inject ILogService LogService @@ -56,7 +56,7 @@ else Function @context.LogDate @context.Level @context.Feature
+
+ + + + + + + + + + + + + + + + + + + + + @if (_pageName != string.Empty) + { + } + @if (_moduleTitle != string.Empty) + { + } + @if (_username != string.Empty) + { + } + + + + + + + + + + + + + @if (!string.IsNullOrEmpty(_exception)) + { - - - - - @if (_pageName != string.Empty) - { - - - - - } - @if (_moduleTitle != string.Empty) - { - - - - - } - @if (_username != string.Empty) - { - - - - - } - - - - - - - - - - - - - @if (!string.IsNullOrEmpty(_exception)) - { - - - - - } - - - - - - - - -
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
- + - +
- + - +
- + - +
+ + + +
+ + + +
+ + + +
- + - +
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
-Cancel + } + + + + + + + + + + + + + + + + + +@Localizer["Cancel"] @code { private int _logId; @@ -167,7 +168,7 @@ _feature = log.Feature; _function = log.Function; _category = log.Category; - + if (log.PageId != null) { var page = await PageService.GetPageAsync(log.PageId.Value); @@ -176,7 +177,7 @@ _pageName = page.Name; } } - + if (log.PageId != null && log.ModuleId != null) { var pagemodule = await PageModuleService.GetPageModuleAsync(log.PageId.Value, log.ModuleId.Value); @@ -185,7 +186,7 @@ _moduleTitle = pagemodule.Title; } } - + if (log.UserId != null) { var user = await UserService.GetUserAsync(log.UserId.Value, PageState.Site.SiteId); @@ -194,7 +195,7 @@ _username = user.Username; } } - + _url = log.Url; _template = log.MessageTemplate; _message = log.Message; diff --git a/Oqtane.Client/Modules/Admin/Logs/Index.razor b/Oqtane.Client/Modules/Admin/Logs/Index.razor index f4ae994e..59830a0d 100644 --- a/Oqtane.Client/Modules/Admin/Logs/Index.razor +++ b/Oqtane.Client/Modules/Admin/Logs/Index.razor @@ -1,17 +1,18 @@ @namespace Oqtane.Modules.Admin.Logs @inherits ModuleBase @inject ILogService LogService +@inject IStringLocalizer Localizer @if (_logs == null) { -

Loading...

+

@Localizer["Loading..."]

} else { - - - - + + + + @@ -66,7 +67,7 @@ else } else { -

No Logs Match The Criteria Specified

+

@Localizer["No Logs Match The Criteria Specified"]

} }
- + - + - +  DateLevelFeatureFunction@Localizer["Date"]@Localizer["Level"]@Localizer["Feature"]@Localizer["Function"]