Merge pull request #983 from hishamco/translations

Add missing localization strings
This commit is contained in:
Shaun Walker 2020-12-09 09:54:36 -05:00 committed by GitHub
commit 08f2877e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 82 additions and 79 deletions

View File

@ -7,7 +7,7 @@
@inject IStringLocalizer<Add> Localizer
<TabStrip>
<TabPanel Name="Upload" Heading="Upload Files" ResourceKey="Upload Files">
<TabPanel Name="Upload" Heading="Upload Files" ResourceKey="UploadFiles">
<table class="table table-borderless">
<tr>
<td>
@ -38,7 +38,7 @@
</td>
<td>
<select id="folder" class="form-control" @bind="@_folderId">
<option value="-1">&lt;Select Folder&gt;</option>
<option value="-1">&lt;@Localizer["Select Folder"]&gt;</option>
@foreach (Folder folder in _folders)
{
<option value="@(folder.FolderId)">@(new string('-', folder.Level * 2))@(folder.Name)</option>

View File

@ -16,7 +16,7 @@
<select id="parent" class="form-control" @bind="@_parentId">
@if (PageState.QueryString.ContainsKey("id"))
{
<option value="-1">&lt;No Parent&gt;</option>
<option value="-1">&lt;@Localizer["No Parent"]&gt;</option>
}
@foreach (Folder folder in _folders)
{
@ -44,10 +44,10 @@
{
<button type="button" class="btn btn-success" @onclick="SaveFolder">@Localizer["Save"]</button>
}
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
@if (!_isSystem && PageState.QueryString.ContainsKey("id"))
{
<ActionDialog Header="Delete Folder" Message="@("Are You Sure You Wish To Delete This Folder?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteFolder())" ResourceKey="DeleteFolder" />
<ActionDialog Header="Delete Folder" Message="Are You Sure You Wish To Delete This Folder?" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteFolder())" ResourceKey="DeleteFolder" />
}
<br />
<br />

View File

@ -38,7 +38,7 @@
</Header>
<Row>
<td><ActionLink Action="Details" Text="Edit" Parameters="@($"id=" + context.FileId.ToString())" ResourceKey="Details" /></td>
<td><ActionDialog Header="Delete File" Message="@("Are You Sure You Wish To Delete " + context.Name + "?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteFile(context))" ResourceKey="DeleteFile" /></td>
<td><ActionDialog Header="Delete File" Message="@Localizer["Are You Sure You Wish To Delete {0}?", context.Name]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteFile(context))" ResourceKey="DeleteFile" /></td>
<td><a href="@(ContentUrl(context.FileId))" target="_new">@context.Name</a></td>
<td>@context.ModifiedOn</td>
<td>@context.Extension.ToUpper() @Localizer["File"]</td>
@ -47,7 +47,7 @@
</Pager>
@if (_files.Count == 0)
{
<div class="text-center">@Localizer["No Files Exist In Selected Folder"]</div>
<div class="text-center">@Localizer["No Files Exist In Selected Folder"]</div>
}
}

View File

@ -28,7 +28,7 @@ else
</Header>
<Row>
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.JobId.ToString())" ResourceKey="EditJob" /></td>
<td><ActionDialog Header="Delete Job" Message="@("Are You Sure You Wish To Delete This Job?")" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteJob(context))" ResourceKey="DeleteJob" /></td>
<td><ActionDialog Header="Delete Job" Message="Are You Sure You Wish To Delete This Job?" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteJob(context))" ResourceKey="DeleteJob" /></td>
<td><ActionLink Action="Log" Class="btn btn-secondary" Parameters="@($"id=" + context.JobId.ToString())" ResourceKey="JobLog" /></td>
<td>@context.Name</td>
<td>@DisplayStatus(context.IsEnabled, context.IsExecuting)</td>
@ -63,17 +63,17 @@ else
var status = string.Empty;
if (!isEnabled)
{
status = "Disabled";
status = Localizer["Disabled"];
}
else
{
if (isExecuting)
{
status = "Executing";
status = Localizer["Executing"];
}
else
{
status = "Idle";
status = Localizer["Idle"];
}
}
@ -83,26 +83,26 @@ else
private string DisplayFrequency(int interval, string frequency)
{
var result = "Every " + interval.ToString() + " ";
var result = $"{Localizer["Every"]} {interval.ToString()} ";
switch (frequency)
{
case "m":
result += "Minute";
result += Localizer["Minute"];
break;
case "H":
result += "Hour";
result += Localizer["Hour"];
break;
case "d":
result += "Day";
result += Localizer["Day"];
break;
case "M":
result += "Month";
result += Localizer["Month"];
break;
}
if (interval > 1)
{
result += "s";
result += Localizer["s"];
}
return result;

View File

@ -50,17 +50,17 @@ else
var status = string.Empty;
if (isExecuting)
{
status = "Executing";
status = Localizer["Executing"];
}
else
{
if (succeeded != null && succeeded.Value)
{
status = "Succeeded";
status = Localizer["Succeeded"];
}
else
{
status = "Failed";
status = Localizer["Failed"];
}
}

View File

@ -14,13 +14,13 @@ else
<td>
<label>@Localizer["Level:"] </label>
<select class="form-control" @onchange="(e => LevelChanged(e))">
<option value="-">&lt;All Levels&gt;</option>
<option value="Trace">Trace</option>
<option value="Debug">Debug</option>
<option value="Information">Information</option>
<option value="Warning">Warning</option>
<option value="Error">Error</option>
<option value="Critical">Critical</option>
<option value="-">&lt;@Localizer["All Levels"]&gt;</option>
<option value="Trace">@Localizer["Trace"]</option>
<option value="Debug">@Localizer["Debug"]</option>
<option value="Information">@Localizer["Information"]</option>
<option value="Warning">@Localizer["Warning"]</option>
<option value="Error">@Localizer["Error"]</option>
<option value="Critical">@Localizer["Critical"]</option>
</select>
</td>
<td>

View File

@ -19,13 +19,13 @@
<Header>
<th style="width: 1px;">&nbsp;</th>
<th style="width: 1px;">&nbsp;</th>
<th>Name</th>
<th>@Localizer["Name"]</th>
<th>@Localizer["Deleted By"]</th>
<th>@Localizer["Deleted On"]</th>
</Header>
<Row>
<td><button @onclick="@(() => RestorePage(context))" class="btn btn-info" title="Restore">Restore</button></td>
<td><ActionDialog Header="Delete Page" Message="@("Are You Sure You Wish To Permanently Delete The " + context.Name + " Page?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeletePage(context))" ResourceKey="DeletePage" /></td>
<td><ActionDialog Header="Delete Page" Message="@Localizer["Are You Sure You Wish To Permanently Delete The {0} Page?", context.Name]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeletePage(context))" ResourceKey="DeletePage" /></td>
<td>@context.Name</td>
<td>@context.DeletedBy</td>
<td>@context.DeletedOn</td>
@ -52,7 +52,7 @@
</Header>
<Row>
<td><button @onclick="@(() => RestoreModule(context))" class="btn btn-info" title="Restore">@Localizer["Restore"]</button></td>
<td><ActionDialog Header="Delete Module" Message="@("Are You Sure You Wish To Permanently Delete The " + context.Title + " Module?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteModule(context))" ResourceKey="DeleteModule" /></td>
<td><ActionDialog Header="Delete Module" Message="@Localizer["Are You Sure You Wish To Permanently Delete The {0} Module?", context.Title]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteModule(context))" ResourceKey="DeleteModule" /></td>
<td>@PageState.Pages.Find(item => item.PageId == context.PageId).Name</td>
<td>@context.Title</td>
<td>@context.DeletedBy</td>

View File

@ -20,7 +20,7 @@ else
</Header>
<Row>
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.RoleId.ToString())" Disabled="@(context.IsSystem)" ResourceKey="Edit" /></td>
<td><ActionDialog Header="Delete Role" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Role?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteRole(context))" Disabled="@(context.IsSystem)" ResourceKey="DeleteRole" /></td>
<td><ActionDialog Header="Delete Role" Message="@Localizer["Are You Sure You Wish To Delete The {0} Role?", context.Name]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteRole(context))" Disabled="@(context.IsSystem)" ResourceKey="DeleteRole" /></td>
<td><ActionLink Action="Users" Parameters="@($"id=" + context.RoleId.ToString())" ResourceKey="Users" /></td>
<td>@context.Name</td>
</Row>

View File

@ -25,7 +25,7 @@ else
</td>
<td>
<select id="user" class="form-control" @bind="@userid">
<option value="-1">&lt;Select User&gt;</option>
<option value="-1">&lt;@Localizer["Select User"]&gt;</option>
@foreach (UserRole userrole in users)
{
<option value="@(userrole.UserId)">@userrole.User.DisplayName</option>

View File

@ -21,7 +21,7 @@ else
</Header>
<Row>
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.AliasId.ToString())" ResourceKey="EditSite" /></td>
<td><ActionDialog Header="Delete Site" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Site?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteSite(context))" ResourceKey="DeleteSite" /></td>
<td><ActionDialog Header="Delete Site" Message="@Localizer["Are You Sure You Wish To Delete The {0} Site?", context.Name]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteSite(context))" ResourceKey="DeleteSite" /></td>
<td><a href="@(_scheme + context.Name)">@context.Name</a></td>
</Row>
</Pager>

View File

@ -105,7 +105,7 @@ else
}
else
{
table = "No Results Returned";
table = Localizer["No Results Returned"];
}
return table;

View File

@ -18,7 +18,7 @@ else
</Header>
<Row>
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.TenantId.ToString())" ResourceKey="EditTenant" /></td>
<td><ActionDialog Header="Delete Tenant" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Tenant?")" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteTenant(context))" Disabled="@(context.Name == TenantNames.Master)" ResourceKey="DeleteTenant" /></td>
<td><ActionDialog Header="Delete Tenant" Message="@Localizer["Are You Sure You Wish To Delete The {0} Tenant?", context.Name]" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteTenant(context))" Disabled="@(context.Name == TenantNames.Master)" ResourceKey="DeleteTenant" /></td>
<td>@context.Name</td>
</Row>
</Pager>

View File

@ -26,17 +26,17 @@ else
<td><ActionLink Action="View" Parameters="@($"name=" + WebUtility.UrlEncode(context.ThemeName))" ResourceKey="ViewTheme" /></td>
<td>
@if (context.AssemblyName != "Oqtane.Client")
{
<ActionDialog Header="Delete Theme" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Theme?")" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteTheme(context))" ResourceKey="DeleteTheme" />
}
{
<ActionDialog Header="Delete Theme" Message="@Localizer["Are You Sure You Wish To Delete The {0} Theme?", context.Name]" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteTheme(context))" ResourceKey="DeleteTheme" />
}
</td>
<td>@context.Name</td>
<td>@context.Version</td>
<td>
@if (UpgradeAvailable(context.ThemeName, context.Version))
{
<button type="button" class="btn btn-success" @onclick=@(async () => await DownloadTheme(context.ThemeName, context.Version))>@Localizer["Upgrade"]</button>
}
{
<button type="button" class="btn btn-success" @onclick=@(async () => await DownloadTheme(context.ThemeName, context.Version))>@Localizer["Upgrade"]</button>
}
</td>
<td></td>
</Row>

View File

@ -149,7 +149,7 @@ else
</Header>
<Row>
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="ViewNotification" /></td>
<td><ActionDialog Header="Delete Notification" Message="@("Are You Sure You Wish To Delete This Notification?")" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
<td><ActionDialog Header="Delete Notification" Message="Are You Sure You Wish To Delete This Notification?" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
<td>@context.FromDisplayName</td>
<td>@context.Subject</td>
<td>@context.CreatedOn</td>
@ -181,7 +181,7 @@ else
</Header>
<Row>
<td><ActionLink Action="View" Parameters="@($"id=" + context.NotificationId.ToString())" Security="SecurityAccessLevel.View" EditMode="false" ResourceKey="ViewNotification" /></td>
<td><ActionDialog Header="Delete Notification" Message="@("Are You Sure You Wish To Delete This Notification?")" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
<td><ActionDialog Header="Delete Notification" Message="Are You Sure You Wish To Delete This Notification?" Action="Delete" Security="SecurityAccessLevel.View" Class="btn btn-danger" OnClick="@(async () => await Delete(context))" EditMode="false" ResourceKey="DeleteNotification" /></td>
<td>@context.ToDisplayName</td>
<td>@context.Subject</td>
<td>@context.CreatedOn</td>

View File

@ -10,7 +10,7 @@
<table class="table table-borderless">
<tr>
<td>
<label class="control-label">@title: </label>
<label class="control-label">@Localizer["Title:"] </label>
</td>
@if (title == "From")
{

View File

@ -14,7 +14,7 @@
<tr>
<td>
<label class="control-label">@Localizer["Username:"] </label>
</td>
</td>
<td>
<input class="form-control" @bind="@username" />
</td>

View File

@ -31,7 +31,7 @@ else
<ActionLink Action="Edit" Parameters="@($"id=" + context.UserId.ToString())" ResourceKey="EditUser" />
</td>
<td>
<ActionDialog Header="Delete User" Message="@("Are You Sure You Wish To Delete " + context.User.DisplayName + "?")" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteUser(context))" ResourceKey="DeleteUser" />
<ActionDialog Header="Delete User" Message="@Localizer["Are You Sure You Wish To Delete {0}?", context.User.DisplayName]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteUser(context))" ResourceKey="DeleteUser" />
</td>
<td>
<ActionLink Action="Roles" Parameters="@($"id=" + context.UserId.ToString())" ResourceKey="Roles" />

View File

@ -14,7 +14,7 @@ else
<table class="table table-borderless">
<tr>
<td>
<Label For="user" HelpText="The user you are assigning roles to" resource="User">User: </Label>
<Label For="user" HelpText="The user you are assigning roles to" ResourceKey="User">User: </Label>
</td>
<td>
<input id="user" class="form-control" @bind="@name" disabled />
@ -26,7 +26,7 @@ else
</td>
<td>
<select id="role" class="form-control" @bind="@roleid">
<option value="-1">&lt;Select Role&gt;</option>
<option value="-1">&lt;@Localizer["Select Role"]&gt;</option>
@foreach (Role role in roles)
{
<option value="@(role.RoleId)">@role.Name</option>
@ -36,7 +36,7 @@ else
</tr>
<tr>
<td>
<Label For="effectiveDate" HelpText="The date that this role assignment is active" resource="EffectiveDate">Effective Date: </Label>
<Label For="effectiveDate" HelpText="The date that this role assignment is active" ResourceKey="EffectiveDate">Effective Date: </Label>
</td>
<td>
<input id="effectiveDate" class="form-control" @bind="@effectivedate" />

View File

@ -1,5 +1,6 @@
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
@inject IStringLocalizer<AuditInfo> Localizer
@if (_text != string.Empty)
{
@ -39,16 +40,16 @@
_text = string.Empty;
if (!String.IsNullOrEmpty(CreatedBy) || CreatedOn.HasValue)
{
_text += "<p style=\"" + Style + "\">Created ";
_text += $"<p style=\"{Style}\">{Localizer["Created"]} ";
if (!String.IsNullOrEmpty(CreatedBy))
{
_text += " by <b>" + CreatedBy + "</b>";
_text += $" {Localizer["by"]} <b>{CreatedBy}</b>";
}
if (CreatedOn != null)
{
_text += " on <b>" + CreatedOn.Value.ToString("MMM dd yyyy HH:mm:ss") + "</b>";
_text += $" {Localizer["on"]} <b>{CreatedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
}
_text += "</p>";
@ -56,16 +57,16 @@
if (!String.IsNullOrEmpty(ModifiedBy) || ModifiedOn.HasValue)
{
_text += "<p style=\"" + Style + "\">Last modified ";
_text += $"<p style=\"{Style}\">{Localizer["Last modified"]} ";
if (!String.IsNullOrEmpty(ModifiedBy))
{
_text += " by <b>" + ModifiedBy + "</b>";
_text += $" {Localizer["by"]} <b>{ModifiedBy}</b>";
}
if (ModifiedOn != null)
{
_text += " on <b>" + ModifiedOn.Value.ToString("MMM dd yyyy HH:mm:ss") + "</b>";
_text += $" {Localizer["on"]} <b>{ModifiedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
}
_text += "</p>";
@ -73,16 +74,16 @@
if (!String.IsNullOrEmpty(DeletedBy) || DeletedOn.HasValue)
{
_text += "<p style=\"" + Style + "\">Deleted ";
_text += $"<p style=\"{Style}\">{Localizer["Deleted"]} ";
if (!String.IsNullOrEmpty(DeletedBy))
{
_text += " by <b>" + DeletedBy + "</b>";
_text += $" {Localizer["by"]} <b>{DeletedBy}</b>";
}
if (DeletedOn != null)
{
_text += " on <b>" + DeletedOn.Value.ToString("MMM dd yyyy HH:mm:ss") + "</b>";
_text += $" {Localizer["on"]} <b>{DeletedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
}
_text += "</p>";

View File

@ -1,7 +1,8 @@
@namespace Oqtane.Modules.Controls
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
@inject IFolderService FolderService
@inject IFileService FileService
@inject IStringLocalizer<FileManager> Localizer
@if (_folders != null)
{
@ -14,7 +15,7 @@
<select class="form-control" @onchange="(e => FolderChanged(e))">
@if (string.IsNullOrEmpty(Folder))
{
<option value="-1">&lt;Select Folder&gt;</option>
<option value="-1">&lt;@Localizer["Select Folder"]&gt;</option>
}
@foreach (Folder folder in _folders)
{
@ -34,7 +35,7 @@
{
<div>
<select class="form-control" @onchange="(e => FileChanged(e))">
<option value="-1">&lt;Select File&gt;</option>
<option value="-1">&lt;@Localizer["Select File"]&gt;</option>
@foreach (File file in _files)
{
if (file.FileId == FileId)
@ -62,10 +63,10 @@
}
<span id="@_progressinfoid"></span><progress id="@_progressbarid" style="width: 150px; visibility: hidden;"></progress>
<span class="float-right">
<button type="button" class="btn btn-success" @onclick="UploadFile">Upload</button>
<button type="button" class="btn btn-success" @onclick="UploadFile">@Localizer["Upload"]</button>
@if (ShowFiles && GetFileId() != -1)
{
<button type="button" class="btn btn-danger" @onclick="DeleteFile">Delete</button>
<button type="button" class="btn btn-danger" @onclick="DeleteFile">@Localizer["Delete"]</button>
}
</span>
</div>
@ -219,7 +220,7 @@
{
await logger.LogError(ex, "Error Loading Files {Error}", ex.Message);
_message = "Error Loading Files";
_message = Localizer["Error Loading Files"];
_messagetype = MessageType.Error;
}
}
@ -278,7 +279,7 @@
{
await logger.LogInformation("File Upload Succeeded {Files}", upload);
_message = "File Upload Succeeded";
_message = Localizer["File Upload Succeeded"];
_messagetype = MessageType.Success;
await GetFiles();
@ -298,7 +299,7 @@
{
await logger.LogError("File Upload Failed For {Files}", result.Replace(",", ", "));
_message = "File Upload Failed";
_message = Localizer["File Upload Failed"];
_messagetype = MessageType.Error;
}
}
@ -306,13 +307,13 @@
{
await logger.LogError(ex, "File Upload Failed {Error}", ex.Message);
_message = "File Upload Failed";
_message = Localizer["File Upload Failed"];
_messagetype = MessageType.Error;
}
}
else
{
_message = "You Have Not Selected A File To Upload";
_message = Localizer["You Have Not Selected A File To Upload"];
_messagetype = MessageType.Warning;
}
}
@ -325,7 +326,7 @@
await FileService.DeleteFileAsync(FileId);
await logger.LogInformation("File Deleted {File}", FileId);
_message = "File Deleted";
_message = Localizer["File Deleted"];
_messagetype = MessageType.Success;
await GetFiles();
@ -337,7 +338,7 @@
{
await logger.LogError(ex, "Error Deleting File {File} {Error}", FileId, ex.Message);
_message = "Error Deleting File";
_message = Localizer["Error Deleting File"];
_messagetype = MessageType.Error;
}
}

View File

@ -13,7 +13,7 @@
<th scope="col">@Localizer["Role"]</th>
@foreach (PermissionString permission in _permissions)
{
<th style="text-align: center; width: 1px;">@permission.PermissionName</th>
<th style="text-align: center; width: 1px;">@Localizer[permission.PermissionName]</th>
}
</tr>
@foreach (Role role in _roles)
@ -39,7 +39,7 @@
<th scope="col">@Localizer["User"]</th>
@foreach (PermissionString permission in _permissions)
{
<th style="text-align: center; width: 1px;">@permission.PermissionName</th>
<th style="text-align: center; width: 1px;">@Localizer[permission.PermissionName]</th>
}
</tr>
</thead>
@ -65,7 +65,7 @@
<tbody>
<tr>
<td class="input-group">
<input type="text" name="Username" class="form-control" placeholder="Enter Username" @bind="@_username" />
<input type="text" name="Username" class="form-control" placeholder="@Localizer["Enter Username"]" @bind="@_username" />
<button type="button" class="btn btn-primary" @onclick="AddUser">@Localizer["Add"]</button>
</td>
</tr>

View File

@ -1,5 +1,6 @@
@namespace Oqtane.Modules.Controls
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
@inject IStringLocalizer<TriStateCheckBox> Localizer
<img src="@_src" title="@_title" @onclick="SetValue" />
@ -51,11 +52,11 @@
{
case true:
_src = "images/checked.png";
_title = "Permission Granted";
_title = Localizer["Permission Granted"];
break;
case false:
_src = "images/unchecked.png";
_title = "Permission Denied";
_title = Localizer["Permission Denied"];
break;
case null:
_src = "images/null.png";

View File

@ -404,17 +404,17 @@
await PageModuleService.AddPageModuleAsync(pageModule);
await PageModuleService.UpdatePageModuleOrderAsync(pageModule.PageId, pageModule.Pane);
Message = "<br /><div class=\"alert alert-success\" role=\"alert\">Module Added To Page</div>";
Message = $"<br /><div class=\"alert alert-success\" role=\"alert\">{Localizer["Module Added To Page"]}</div>";
NavigationManager.NavigateTo(NavigateUrl());
}
else
{
Message = "<br /><div class=\"alert alert-warning\" role=\"alert\">You Must Select A Module</div>";
Message = $"<br /><div class=\"alert alert-warning\" role=\"alert\">{Localizer["You Must Select A Module"]}</div>";
}
}
else
{
Message = "<br /><div class=\"alert alert-error\" role=\"alert\">Not Authorized</div>";
Message = $"<br /><div class=\"alert alert-error\" role=\"alert\">{Localizer["Not Authorized"]}</div>";
}
}