fix remaining default resx differences, enhance module message with ability to dismiss, fix issue in ConfigManager.RemoveSetting, introduce package registry service
This commit is contained in:
@ -55,17 +55,15 @@ else
|
||||
<TabPanel Name="Download" ResourceKey="Download" Security="SecurityAccessLevel.Host">
|
||||
@if (_packages != null && _packages.Count > 0)
|
||||
{
|
||||
<ModuleMessage Type="MessageType.Info" Message="Download one or more language packages from the list below. Once you are ready click Install to complete the installation."></ModuleMessage>
|
||||
<ModuleMessage Type="MessageType.Info" Message="Download one or more translations from the list below. Once you are ready click Install to complete the installation."></ModuleMessage>
|
||||
<Pager Items="@_packages">
|
||||
<Header>
|
||||
<th>@Localizer["Name"]</th>
|
||||
<th>@Localizer["Version"]</th>
|
||||
<th style="width: 1px"></th>
|
||||
</Header>
|
||||
<Row>
|
||||
<td>@context.Name</td>
|
||||
<td>@context.Version</td>
|
||||
<td>
|
||||
<h3 style="display: inline;"><a href="@context.ProductUrl" target="_new">@context.Name</a></h3> by: <strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br />
|
||||
<strong>@context.Downloads.ToString("###,###,##0")</strong> downloads | released: <strong>@context.ReleaseDate.ToString("MMM dd, yyyy")</strong> | version: <strong>@context.Version</strong><br />
|
||||
@(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadLanguage(context.PackageId, context.Version))>@Localizer["Download"]</button>
|
||||
</td>
|
||||
</Row>
|
||||
@ -75,14 +73,14 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
<ModuleMessage Type="MessageType.Info" Message="No Language Packages Are Available To Download"></ModuleMessage>
|
||||
<ModuleMessage Type="MessageType.Info" Message="No Translations Are Available To Download"></ModuleMessage>
|
||||
}
|
||||
</TabPanel>
|
||||
<TabPanel Name="Upload" ResourceKey="Upload" Security="SecurityAccessLevel.Host">
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<Label HelpText="Upload one or more language packages. Once they are uploaded click Install to complete the installation." ResourceKey="Module">Language: </Label>
|
||||
<Label HelpText="Upload one or more translations. Once they are uploaded click Install to complete the installation." ResourceKey="Module">Language: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<FileManager Filter="nupkg" ShowFiles="false" Folder="Packages" UploadMultiple="true" />
|
||||
@ -113,7 +111,7 @@ else
|
||||
_supportedCultures = await LocalizationService.GetCulturesAsync();
|
||||
_availableCultures = _supportedCultures
|
||||
.Where(c => !c.Name.Equals(Constants.DefaultCulture) && !languagesCodes.Contains(c.Name));
|
||||
_packages = await PackageService.GetPackagesAsync("language");
|
||||
_packages = await PackageService.GetPackagesAsync("translation");
|
||||
|
||||
if (_supportedCultures.Count() == 1)
|
||||
{
|
||||
@ -164,7 +162,7 @@ else
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Installing Language Package");
|
||||
await logger.LogError(ex, "Error Installing Translations");
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,8 +177,8 @@ else
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Downloading Language Package {Name} {Version}", packageid, version);
|
||||
AddModuleMessage(Localizer["Error.Langauge.Download"], MessageType.Error);
|
||||
await logger.LogError(ex, "Error Downloading Translation {Name} {Version}", packageid, version);
|
||||
AddModuleMessage(Localizer["Error.Language.Download"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user