Localize non components for themes pages

This commit is contained in:
hishamco 2020-11-17 23:42:27 +03:00
parent 1b44de6972
commit c1fa6589af
3 changed files with 15 additions and 12 deletions

View File

@ -1,9 +1,10 @@
@namespace Oqtane.Modules.Admin.Themes @namespace Oqtane.Modules.Admin.Themes
@inherits ModuleBase @inherits ModuleBase
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inject IFileService FileService @inject IFileService FileService
@inject IThemeService ThemeService @inject IThemeService ThemeService
@inject IPackageService PackageService @inject IPackageService PackageService
@inject IStringLocalizer<Add> Localizer
@if (_packages != null) @if (_packages != null)
{ {
@ -14,15 +15,15 @@
<ModuleMessage Type="MessageType.Info" Message="Download one or more themes from the list below. Once you are ready click Install to complete the installation."></ModuleMessage> <ModuleMessage Type="MessageType.Info" Message="Download one or more themes from the list below. Once you are ready click Install to complete the installation."></ModuleMessage>
<Pager Items="@_packages"> <Pager Items="@_packages">
<Header> <Header>
<th>Name</th> <th>@Localizer["Name"]</th>
<th>Version</th> <th>@Localizer["Version"]</th>
<th style="width: 1px;"></th> <th style="width: 1px;"></th>
</Header> </Header>
<Row> <Row>
<td>@context.Name</td> <td>@context.Name</td>
<td>@context.Version</td> <td>@context.Version</td>
<td> <td>
<button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadTheme(context.PackageId, context.Version))>Download</button> <button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadTheme(context.PackageId, context.Version))>@Localizer["Download"]</button>
</td> </td>
</Row> </Row>
</Pager> </Pager>
@ -42,8 +43,8 @@
</TabPanel> </TabPanel>
</TabStrip> </TabStrip>
<button type="button" class="btn btn-success" @onclick="InstallThemes">Install</button> <button type="button" class="btn btn-success" @onclick="InstallThemes">@Localizer["Install"]</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink> <NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
} }
@code { @code {

View File

@ -1,9 +1,10 @@
@namespace Oqtane.Modules.Admin.Themes @namespace Oqtane.Modules.Admin.Themes
@using System.Net @using System.Net
@inherits ModuleBase @inherits ModuleBase
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inject IThemeService ThemeService @inject IThemeService ThemeService
@inject IPackageService PackageService @inject IPackageService PackageService
@inject IStringLocalizer<Index> Localizer
@if (_themes == null) @if (_themes == null)
{ {
@ -17,8 +18,8 @@ else
<Header> <Header>
<th style="width: 1px;">&nbsp;</th> <th style="width: 1px;">&nbsp;</th>
<th style="width: 1px;">&nbsp;</th> <th style="width: 1px;">&nbsp;</th>
<th scope="col">Name</th> <th scope="col">@Localizer["Name"]</th>
<th scope="col">Version</th> <th scope="col">@Localizer["Version"]</th>
<th>&nbsp;</th> <th>&nbsp;</th>
</Header> </Header>
<Row> <Row>
@ -34,7 +35,7 @@ else
<td> <td>
@if (UpgradeAvailable(context.ThemeName, context.Version)) @if (UpgradeAvailable(context.ThemeName, context.Version))
{ {
<button type="button" class="btn btn-success" @onclick=@(async () => await DownloadTheme(context.ThemeName, context.Version))>Upgrade</button> <button type="button" class="btn btn-success" @onclick=@(async () => await DownloadTheme(context.ThemeName, context.Version))>@Localizer["Upgrade"]</button>
} }
</td> </td>
<td></td> <td></td>

View File

@ -1,8 +1,9 @@
@namespace Oqtane.Modules.Admin.Themes @namespace Oqtane.Modules.Admin.Themes
@using System.Net @using System.Net
@inherits ModuleBase @inherits ModuleBase
@inject IThemeService ThemeService @inject IThemeService ThemeService
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inject IStringLocalizer<View> Localizer
<table class="table table-borderless"> <table class="table table-borderless">
<tr> <tr>
@ -62,7 +63,7 @@
</td> </td>
</tr> </tr>
</table> </table>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink> <NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
@code { @code {
private string _themeName = ""; private string _themeName = "";