Localize non components of the tenants pages

This commit is contained in:
hishamco 2020-11-17 23:47:38 +03:00
parent bbda300952
commit 2672f47cdf
2 changed files with 7 additions and 5 deletions

View File

@ -2,6 +2,7 @@
@inherits ModuleBase
@inject NavigationManager NavigationManager
@inject ITenantService TenantService
@inject IStringLocalizer<Edit> Localizer
<table class="table table-borderless">
<tr>
@ -29,8 +30,8 @@
</tr>
</table>
<button type="button" class="btn btn-success" @onclick="SaveTenant">Save</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
<button type="button" class="btn btn-success" @onclick="SaveTenant">@Localizer["Save"]</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
@code {
private int tenantid;
@ -69,7 +70,7 @@
{
tenant.Name = name;
tenant.DBConnectionString = connectionstring;
await TenantService.UpdateTenantAsync(tenant);
await logger.LogInformation("Tenant Saved {TenantId}", tenantid);

View File

@ -2,10 +2,11 @@
@inherits ModuleBase
@inject ITenantService TenantService
@inject IAliasService AliasService
@inject IStringLocalizer<Index> Localizer
@if (tenants == null)
{
<p><em>Loading...</em></p>
<p><em>@Localizer["Loading..."]</em></p>
}
else
{
@ -13,7 +14,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.TenantId.ToString())" ResourceKey="EditTenant" /></td>