Merge pull request #895 from hishamco/localize-upgrade-page

Localize Upgrade Page
This commit is contained in:
Shaun Walker 2020-11-19 15:33:21 -05:00 committed by GitHub
commit 4973dbb9a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,36 +1,37 @@
@namespace Oqtane.Modules.Admin.Upgrade @namespace Oqtane.Modules.Admin.Upgrade
@inherits ModuleBase @inherits ModuleBase
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inject IFileService FileService @inject IFileService FileService
@inject IPackageService PackageService @inject IPackageService PackageService
@inject IInstallationService InstallationService @inject IInstallationService InstallationService
@inject IStringLocalizer<Index> Localizer
@if (_package != null) @if (_package != null)
{ {
<TabStrip> <TabStrip>
<TabPanel Name="Download"> <TabPanel Name="Download" ResourceKey="Download">
@if (_upgradeavailable) @if (_upgradeavailable)
{ {
<ModuleMessage Type="MessageType.Info" Message="Select The Upgrade Button To Install a New Framework Version"></ModuleMessage> <ModuleMessage Type="MessageType.Info" Message="Select The Upgrade Button To Install a New Framework Version"></ModuleMessage>
<button type="button" class="btn btn-success" @onclick=@(async () => await Download(Constants.PackageId, @_package.Version))>Upgrade To @_package.Version</button> <button type="button" class="btn btn-success" @onclick=@(async () => await Download(Constants.PackageId, @_package.Version))>@Localizer["Upgrade To"] @_package.Version</button>
} }
else else
{ {
<ModuleMessage Type="MessageType.Info" Message="Framework Is Already Up To Date"></ModuleMessage> <ModuleMessage Type="MessageType.Info" Message="Framework Is Already Up To Date"></ModuleMessage>
} }
</TabPanel> </TabPanel>
<TabPanel Name="Upload"> <TabPanel Name="Upload" ResourceKey="Upload">
<table class="table table-borderless"> <table class="table table-borderless">
<tr> <tr>
<td> <td>
<Label HelpText="Upload a framework package and select Install to complete the installation">Framework: </Label> <Label HelpText="Upload a framework package and select Install to complete the installation" ResourceKey="Framework">Framework: </Label>
</td> </td>
<td> <td>
<FileManager Filter="nupkg" ShowFiles="false" Folder="Framework" /> <FileManager Filter="nupkg" ShowFiles="false" Folder="Framework" />
</td> </td>
</tr> </tr>
</table> </table>
<button type="button" class="btn btn-success" @onclick="Upgrade">Install</button> <button type="button" class="btn btn-success" @onclick="Upgrade">@Localizer["Install"]</button>
</TabPanel> </TabPanel>
</TabStrip> </TabStrip>
} }