Localize non components for the profiles pages

This commit is contained in:
hishamco 2020-11-20 00:37:10 +03:00
parent 387c1aa57f
commit fcfcd46d8e
2 changed files with 96 additions and 93 deletions

View File

@ -2,6 +2,7 @@
@inherits ModuleBase
@inject NavigationManager NavigationManager
@inject IProfileService ProfileService
@inject IStringLocalizer<Edit> Localizer
<table class="table table-borderless">
<tr>
@ -74,8 +75,8 @@
</td>
<td>
<select id="required" class="form-control" @bind="@_isrequired">
<option value="True">Yes</option>
<option value="False">No</option>
<option value="True">@Localizer["Yes"]</option>
<option value="False">@Localizer["No"]</option>
</select>
</td>
</tr>
@ -85,14 +86,14 @@
</td>
<td>
<select id="private" class="form-control" @bind="@_isprivate">
<option value="True">Yes</option>
<option value="False">No</option>
<option value="True">@Localizer["Yes"]</option>
<option value="False">@Localizer["No"]</option>
</select>
</td>
</tr>
</table>
<button type="button" class="btn btn-success" @onclick="SaveProfile">Save</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
<button type="button" class="btn btn-success" @onclick="SaveProfile">@Localizer["Save"]</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
@code {
private int _profileid = -1;
@ -169,7 +170,8 @@
if (_profileid != -1)
{
profile = await ProfileService.UpdateProfileAsync(profile);
}else
}
else
{
profile = await ProfileService.AddProfileAsync(profile);
}

View File

@ -1,10 +1,11 @@
@namespace Oqtane.Modules.Admin.Profiles
@inherits ModuleBase
@inject IProfileService ProfileService
@inject IStringLocalizer<Index> Localizer
@if (_profiles == null)
{
<p><em>Loading...</em></p>
<p><em>@Localizer["Loading..."]</em></p>
}
else
{
@ -14,7 +15,7 @@ else
<Header>
<th style="width: 1px;">&nbsp;</th>
<th style="width: 1px;">&nbsp;</th>
<th>Name</th>
<th>@Localizer["Name"]</th>
</Header>
<Row>
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.ProfileId.ToString())" ResourceKey="EditProfile" /></td>