Merge pull request #983 from hishamco/translations
Add missing localization strings
This commit is contained in:
@ -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>";
|
||||
|
@ -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"><Select Folder></option>
|
||||
<option value="-1"><@Localizer["Select Folder"]></option>
|
||||
}
|
||||
@foreach (Folder folder in _folders)
|
||||
{
|
||||
@ -34,7 +35,7 @@
|
||||
{
|
||||
<div>
|
||||
<select class="form-control" @onchange="(e => FileChanged(e))">
|
||||
<option value="-1"><Select File></option>
|
||||
<option value="-1"><@Localizer["Select File"]></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;
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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";
|
||||
|
Reference in New Issue
Block a user