Skip to content

Commit

Permalink
Merge pull request #983 from hishamco/translations
Browse files Browse the repository at this point in the history
Add missing localization strings
  • Loading branch information
sbwalker authored Dec 9, 2020
2 parents 3c13122 + 941d08f commit 08f2877
Show file tree
Hide file tree
Showing 23 changed files with 82 additions and 79 deletions.
4 changes: 2 additions & 2 deletions Oqtane.Client/Modules/Admin/Files/Add.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions Oqtane.Client/Modules/Admin/Files/Edit.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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 />
Expand Down
4 changes: 2 additions & 2 deletions Oqtane.Client/Modules/Admin/Files/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
}
}

Expand Down
20 changes: 10 additions & 10 deletions Oqtane.Client/Modules/Admin/Jobs/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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"];
}
}

Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions Oqtane.Client/Modules/Admin/Jobs/Log.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
}
}

Expand Down
14 changes: 7 additions & 7 deletions Oqtane.Client/Modules/Admin/Logs/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions Oqtane.Client/Modules/Admin/RecycleBin/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Admin/Roles/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Admin/Roles/Users.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Admin/Sites/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Admin/Sql/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ else
}
else
{
table = "No Results Returned";
table = Localizer["No Results Returned"];
}

return table;
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Admin/Tenants/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
12 changes: 6 additions & 6 deletions Oqtane.Client/Modules/Admin/Themes/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions Oqtane.Client/Modules/Admin/UserProfile/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Admin/UserProfile/View.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Admin/Users/Add.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<tr>
<td>
<label class="control-label">@Localizer["Username:"] </label>
</td>
</td>
<td>
<input class="form-control" @bind="@username" />
</td>
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Admin/Users/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
6 changes: 3 additions & 3 deletions Oqtane.Client/Modules/Admin/Users/Roles.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand All @@ -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>
Expand All @@ -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" />
Expand Down
Loading

0 comments on commit 08f2877

Please sign in to comment.