mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 11:14:45 +00:00
[Blazor] Add localization.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.6"/>
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="2.0.0-preview1-final"/>
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.6"/>
|
||||
<PackageVersion Include="Microsoft.Extensions.Localization" Version="9.0.6"/>
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.6"/>
|
||||
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter" Version="4.12.1"/>
|
||||
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15"/>
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
@using Microsoft.Extensions.Localization
|
||||
@using RomRepoMgr.Blazor.Resources
|
||||
@implements IDialogContentComponent
|
||||
@inject ILogger<ImportDats> Logger
|
||||
@inject ILogger<ImportDats> Logger
|
||||
@inject IStringLocalizer<Localization> Localizer
|
||||
|
||||
<FluentDialog Width="800px" Height="400px" Title="Import DATs" Modal="true" TrapFocus="true">
|
||||
<FluentDialogBody>
|
||||
<div>
|
||||
<p hidden="@IsBusy">DAT files will be imported from @path.</p>
|
||||
<p hidden="@IsBusy">@string.Format(Localizer["DATs_will_be_imported_from"], path)</p>
|
||||
<FluentLabel Color="@StatusColor">@StatusMessage</FluentLabel>
|
||||
<FluentProgress Max="@ProgressMax" Min="@ProgressMin" Value="@ProgressValue" Visible="@ProgressVisible"/>
|
||||
</div>
|
||||
@@ -18,8 +21,8 @@
|
||||
</FluentDialogBody>
|
||||
<FluentDialogFooter>
|
||||
<FluentStack Orientation="Orientation.Horizontal">
|
||||
<FluentButton OnClick="@Start" Disabled="@IsBusy">Start</FluentButton>
|
||||
<FluentButton OnClick="@CloseAsync" Disabled="@CannotClose">Close</FluentButton>
|
||||
<FluentButton OnClick="@Start" Disabled="@IsBusy">@Localizer["Start"]</FluentButton>
|
||||
<FluentButton OnClick="@CloseAsync" Disabled="@CannotClose">@Localizer["Close"]</FluentButton>
|
||||
</FluentStack>
|
||||
</FluentDialogFooter>
|
||||
</FluentDialog>
|
||||
@@ -52,7 +52,7 @@ public partial class ImportDats : ComponentBase
|
||||
CannotClose = true;
|
||||
ProgressVisible = true;
|
||||
ProgressValue = null;
|
||||
StatusMessage = "Searching for files...";
|
||||
StatusMessage = Localizer["SearchingForFiles"];
|
||||
|
||||
_stopwatch.Restart();
|
||||
string[] dats = Directory.GetFiles(path, "*.dat", SearchOption.AllDirectories);
|
||||
@@ -66,7 +66,7 @@ public partial class ImportDats : ComponentBase
|
||||
_stopwatch.Elapsed.TotalSeconds,
|
||||
_datFiles.Length);
|
||||
|
||||
StatusMessage = string.Format("Found {0} files...", _datFiles.Length);
|
||||
StatusMessage = string.Format(Localizer["FoundFiles"], _datFiles.Length);
|
||||
|
||||
ProgressMin = 0;
|
||||
ProgressMax = _datFiles.Length;
|
||||
@@ -89,7 +89,7 @@ public partial class ImportDats : ComponentBase
|
||||
{
|
||||
ProgressVisible = false;
|
||||
Progress2Visible = false;
|
||||
StatusMessage = "Finished";
|
||||
StatusMessage = Localizer["Finished"];
|
||||
CannotClose = false;
|
||||
|
||||
StateHasChanged();
|
||||
@@ -107,7 +107,7 @@ public partial class ImportDats : ComponentBase
|
||||
|
||||
_ = InvokeAsync(() =>
|
||||
{
|
||||
StatusMessage = string.Format("Importing {0}...", Path.GetFileName(_datFiles[_listPosition]));
|
||||
StatusMessage = string.Format(Localizer["ImportingItem"], Path.GetFileName(_datFiles[_listPosition]));
|
||||
ProgressValue = _listPosition;
|
||||
|
||||
StateHasChanged();
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
@using Microsoft.Extensions.Localization
|
||||
@using RomRepoMgr.Blazor.Resources
|
||||
@using RomRepoMgr.Database
|
||||
@implements IDialogContentComponent
|
||||
@inject ILogger<ImportRoms> Logger
|
||||
@inject Context _ctx
|
||||
@inject ILogger<ImportRoms> Logger
|
||||
@inject Context _ctx
|
||||
@inject IStringLocalizer<Localization> Localizer
|
||||
|
||||
<FluentDialog Width="1600px" Height="800px" Title="Import DATs" Modal="true" TrapFocus="true">
|
||||
<FluentDialogBody>
|
||||
<p hidden="@IsBusy">ROM files will be imported from @FolderPath.</p>
|
||||
<p hidden="@IsBusy">@string.Format(Localizer["ROMs_will_be_imported_from"], FolderPath)</p>
|
||||
@if(NotYetStarted)
|
||||
{
|
||||
<FluentCheckbox @bind-Value="@RemoveFilesChecked" Label="Remove files after import successful."/>
|
||||
<FluentCheckbox @bind-Value="@RemoveFilesChecked" Label="@Localizer["RemoveFilesLabel"]"/>
|
||||
|
||||
<FluentCheckbox @bind-Value="@KnownOnlyChecked" Label="Only import known files."/>
|
||||
<FluentCheckbox @bind-Value="@KnownOnlyChecked" Label="@Localizer["KnownOnlyLabel"]"/>
|
||||
|
||||
<FluentCheckbox @bind-Value="@RecurseArchivesChecked"
|
||||
Label="Try to detect archives and import their contents."/>
|
||||
Label=@Localizer["RecurseArchivesLabel"]/>
|
||||
}
|
||||
@if(Importing)
|
||||
{
|
||||
@@ -32,8 +35,8 @@
|
||||
</FluentDialogBody>
|
||||
<FluentDialogFooter>
|
||||
<FluentStack Orientation="Orientation.Horizontal">
|
||||
<FluentButton OnClick="@Start" Disabled="@IsBusy">Start</FluentButton>
|
||||
<FluentButton OnClick="@CloseAsync" Disabled="@CannotClose">Close</FluentButton>
|
||||
<FluentButton OnClick="@Start" Disabled="@IsBusy">@Localizer["Start"]</FluentButton>
|
||||
<FluentButton OnClick="@CloseAsync" Disabled="@CannotClose">@Localizer["Close"]</FluentButton>
|
||||
</FluentStack>
|
||||
</FluentDialogFooter>
|
||||
</FluentDialog>
|
||||
@@ -12,42 +12,39 @@ namespace RomRepoMgr.Blazor.Components.Dialogs;
|
||||
|
||||
public partial class ImportRoms : ComponentBase
|
||||
{
|
||||
readonly ConcurrentBag<DbDisk> _newDisks = [];
|
||||
readonly ConcurrentBag<DbFile> _newFiles = [];
|
||||
readonly ConcurrentBag<DbMedia> _newMedias = [];
|
||||
readonly Stopwatch _mainStopwatch = new();
|
||||
readonly ConcurrentBag<DbDisk> _newDisks = [];
|
||||
readonly ConcurrentBag<DbFile> _newFiles = [];
|
||||
readonly ConcurrentBag<DbMedia> _newMedias = [];
|
||||
readonly Stopwatch _stopwatch = new();
|
||||
int _listPosition;
|
||||
|
||||
readonly Stopwatch _mainStopwatch = new();
|
||||
FileImporter _rootImporter;
|
||||
readonly Stopwatch _stopwatch = new();
|
||||
PaginationState? pagination;
|
||||
FileImporter _rootImporter;
|
||||
PaginationState? pagination;
|
||||
[CascadingParameter]
|
||||
public FluentDialog Dialog { get; set; }
|
||||
public bool IsBusy { get; set; }
|
||||
public bool NotYetStarted { get; set; }
|
||||
public bool RemoveFilesChecked { get; set; }
|
||||
public bool KnownOnlyChecked { get; set; }
|
||||
public bool RecurseArchivesChecked { get; set; }
|
||||
public Color? StatusMessageColor { get; set; }
|
||||
public string? StatusMessage { get; set; }
|
||||
public int? ProgressMax { get; set; }
|
||||
public int? ProgressMin { get; set; }
|
||||
public int? ProgressValue { get; set; }
|
||||
public string? StatusMessage2 { get; set; }
|
||||
public int? Progress2Max { get; set; }
|
||||
public int? Progress2Min { get; set; }
|
||||
public int? Progress2Value { get; set; }
|
||||
public IQueryable<object>? Importers { get; set; }
|
||||
public string? FolderPath { get; set; }
|
||||
public bool Importing { get; set; }
|
||||
public bool Progress2Visible { get; set; }
|
||||
public bool DataGridVisible { get; set; }
|
||||
public bool CannotClose { get; set; }
|
||||
public FluentDialog Dialog { get; set; }
|
||||
public bool IsBusy { get; set; }
|
||||
public bool NotYetStarted { get; set; }
|
||||
public bool RemoveFilesChecked { get; set; }
|
||||
public bool KnownOnlyChecked { get; set; }
|
||||
public bool RecurseArchivesChecked { get; set; }
|
||||
public Color? StatusMessageColor { get; set; }
|
||||
public string? StatusMessage { get; set; }
|
||||
public int? ProgressMax { get; set; }
|
||||
public int? ProgressMin { get; set; }
|
||||
public int? ProgressValue { get; set; }
|
||||
public string? StatusMessage2 { get; set; }
|
||||
public int? Progress2Max { get; set; }
|
||||
public int? Progress2Min { get; set; }
|
||||
public int? Progress2Value { get; set; }
|
||||
public string? FolderPath { get; set; }
|
||||
public bool Importing { get; set; }
|
||||
public bool Progress2Visible { get; set; }
|
||||
public bool DataGridVisible { get; set; }
|
||||
public bool CannotClose { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
FolderPath = Path.Combine(Environment.CurrentDirectory, Consts.IncomingRomsFolder);
|
||||
IsBusy = false;
|
||||
NotYetStarted = true;
|
||||
@@ -209,7 +206,7 @@ public partial class ImportRoms : ComponentBase
|
||||
{
|
||||
_ = InvokeAsync(() =>
|
||||
{
|
||||
StatusMessage = string.Format("Importing {0}...", Path.GetFileName(file));
|
||||
StatusMessage = string.Format(Localizer["ImportingItem"], Path.GetFileName(file));
|
||||
ProgressValue = _listPosition;
|
||||
|
||||
StateHasChanged();
|
||||
@@ -242,7 +239,7 @@ public partial class ImportRoms : ComponentBase
|
||||
CannotClose = false;
|
||||
IsBusy = false;
|
||||
Importing = false;
|
||||
StatusMessage = "Finished";
|
||||
StatusMessage = Localizer["Finished"];
|
||||
|
||||
StateHasChanged();
|
||||
});
|
||||
@@ -291,7 +288,8 @@ public partial class ImportRoms : ComponentBase
|
||||
{
|
||||
_ = InvokeAsync(() =>
|
||||
{
|
||||
StatusMessage = string.Format("Processing archive: {0}", Path.GetFileName(archive));
|
||||
StatusMessage =
|
||||
string.Format(Localizer["ProcessingArchive"], Path.GetFileName(archive));
|
||||
|
||||
ProgressValue = _listPosition;
|
||||
|
||||
|
||||
@@ -1,35 +1,39 @@
|
||||
@page "/"
|
||||
@using Microsoft.Extensions.Localization
|
||||
@using RomRepoMgr.Blazor.Resources
|
||||
@using RomRepoMgr.Database
|
||||
@rendermode InteractiveServer
|
||||
@inject IDialogService DialogService
|
||||
@inject Context ctx
|
||||
@inject IDialogService DialogService
|
||||
@inject Context ctx
|
||||
@inject IStringLocalizer<Localization> Localizer
|
||||
|
||||
|
||||
<PageTitle>ROM Repository Manager</PageTitle>
|
||||
|
||||
<FluentToolbar>
|
||||
<FluentButton OnClick="@ImportDatsAsync">Import DATs</FluentButton>
|
||||
<FluentButton Disabled="true">Export DAT</FluentButton>
|
||||
<FluentButton Disabled="true">Remove DAT</FluentButton>
|
||||
<FluentButton OnClick="@ImportRomsAsync">Import ROMs</FluentButton>
|
||||
<FluentButton Disabled="true">Export ROMs</FluentButton>
|
||||
<FluentButton OnClick="@ImportDatsAsync">@Localizer["ImportDats"]</FluentButton>
|
||||
<FluentButton Disabled="true">@Localizer["ExportDat"]</FluentButton>
|
||||
<FluentButton Disabled="true">@Localizer["RemoveDat"]</FluentButton>
|
||||
<FluentButton OnClick="@ImportRomsAsync">@Localizer["ImportRoms"]</FluentButton>
|
||||
<FluentButton Disabled="true">@Localizer["ExportRoms"]</FluentButton>
|
||||
</FluentToolbar>
|
||||
|
||||
<FluentDataGrid @ref="romSetsGrid" Items="@RomSets" Style="width: 100%;" AutoFit="true" Pagination="@pagination"
|
||||
AutoItemsPerPage="true" ResizableColumns="true">
|
||||
<PropertyColumn Property="@(p => p.Name)" Title="Name"/>
|
||||
<PropertyColumn Property="@(p => p.Version)" Title="Version"/>
|
||||
<PropertyColumn Property="@(p => p.Author)" Title="Author"/>
|
||||
<PropertyColumn Property="@(p => p.Category)" Title="Category"/>
|
||||
<PropertyColumn Property="@(p => p.Date)" Title="Date"/>
|
||||
<PropertyColumn Property="@(p => p.Description)" Title="Description"/>
|
||||
<PropertyColumn Property="@(p => p.Comment)" Title="Comment"/>
|
||||
<PropertyColumn Property="@(p => p.Homepage)" Title="Homepage"/>
|
||||
<PropertyColumn Property="@(p => p.TotalMachines)" Title="Total machines"/>
|
||||
<PropertyColumn Property="@(p => p.CompleteMachines)" Title="Complete machines"/>
|
||||
<PropertyColumn Property="@(p => p.IncompleteMachines)" Title="Incomplete machines"/>
|
||||
<PropertyColumn Property="@(p => p.TotalRoms)" Title="Total ROMs"/>
|
||||
<PropertyColumn Property="@(p => p.HaveRoms)" Title="Have ROMs"/>
|
||||
<PropertyColumn Property="@(p => p.MissRoms)" Title="Miss ROMs"/>
|
||||
<PropertyColumn Property="@(p => p.Name)" Title="@Localizer["RomSetNameLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.Version)" Title="@Localizer["RomSetVersionLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.Author)" Title="@Localizer["RomSetAuthorLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.Category)" Title="@Localizer["RomSetCategoryLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.Date)" Title="@Localizer["RomSetDateLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.Description)" Title="@Localizer["RomSetDescriptionLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.Comment)" Title="@Localizer["RomSetCommentLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.Homepage)" Title="@Localizer["HomepageLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.TotalMachines)" Title="@Localizer["RomSetTotalMachinesLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.CompleteMachines)" Title="@Localizer["RomSetCompleteMachinesLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.IncompleteMachines)" Title="@Localizer["RomSetIncompleteMachinesLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.TotalRoms)" Title="@Localizer["RomSetTotalRomsLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.HaveRoms)" Title="@Localizer["RomSetHaveRomsLabel"]"/>
|
||||
<PropertyColumn Property="@(p => p.MissRoms)" Title="@Localizer["RomSetMissRomsLabel"]"/>
|
||||
|
||||
</FluentDataGrid>
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.FluentUI.AspNetCore.Components;
|
||||
using RomRepoMgr.Blazor;
|
||||
using RomRepoMgr.Blazor.Components;
|
||||
@@ -57,6 +56,9 @@ builder.Host.UseSerilog(); // ✅ Plug Serilog into the host
|
||||
builder.Services.AddRazorComponents().AddInteractiveServerComponents();
|
||||
builder.Services.AddFluentUIComponents();
|
||||
|
||||
// Localization
|
||||
builder.Services.AddLocalization();
|
||||
|
||||
Log.Debug("Creating database context...");
|
||||
|
||||
builder.Services.AddDbContextFactory<Context>(options =>
|
||||
@@ -100,6 +102,18 @@ app.UseAntiforgery();
|
||||
app.MapStaticAssets();
|
||||
app.MapRazorComponents<App>().AddInteractiveServerRenderMode();
|
||||
|
||||
// Localization
|
||||
string[] supportedCultures = new[]
|
||||
{
|
||||
"en", "es"
|
||||
};
|
||||
|
||||
RequestLocalizationOptions localizationOptions = new RequestLocalizationOptions().SetDefaultCulture("en")
|
||||
.AddSupportedCultures(supportedCultures)
|
||||
.AddSupportedUICultures(supportedCultures);
|
||||
|
||||
app.UseRequestLocalization(localizationOptions);
|
||||
|
||||
Stopwatch stopwatch = new();
|
||||
|
||||
using(IServiceScope scope = app.Services.CreateScope())
|
||||
|
||||
228
RomRepoMgr.Blazor/Resources/Localization.Designer.cs
generated
Normal file
228
RomRepoMgr.Blazor/Resources/Localization.Designer.cs
generated
Normal file
@@ -0,0 +1,228 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace RomRepoMgr.Blazor.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Localization {
|
||||
|
||||
private static System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Localization() {
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.Equals(null, resourceMan)) {
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("RomRepoMgr.Blazor.Resources.Localization", typeof(Localization).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ROMs_will_be_imported_from {
|
||||
get {
|
||||
return ResourceManager.GetString("ROMs_will_be_imported_from", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RemoveFilesLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RemoveFilesLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string KnownOnlyLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("KnownOnlyLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RecurseArchivesLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RecurseArchivesLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Start {
|
||||
get {
|
||||
return ResourceManager.GetString("Start", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Close {
|
||||
get {
|
||||
return ResourceManager.GetString("Close", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ImportingItem {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportingItem", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProcessingArchive {
|
||||
get {
|
||||
return ResourceManager.GetString("ProcessingArchive", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Finished {
|
||||
get {
|
||||
return ResourceManager.GetString("Finished", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string DATs_will_be_imported_from {
|
||||
get {
|
||||
return ResourceManager.GetString("DATs_will_be_imported_from", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string SearchingForFiles {
|
||||
get {
|
||||
return ResourceManager.GetString("SearchingForFiles", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetNameLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetNameLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetVersionLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetVersionLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetAuthorLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetAuthorLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetCategoryLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetCategoryLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetDateLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetDateLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetDescriptionLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetDescriptionLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetCommentLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetCommentLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string HomepageLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("HomepageLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetTotalMachinesLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetTotalMachinesLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetCompleteMachinesLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetCompleteMachinesLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetIncompleteMachinesLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetIncompleteMachinesLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetTotalRomsLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetTotalRomsLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetHaveRomsLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetHaveRomsLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RomSetMissRomsLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("RomSetMissRomsLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ImportDats {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportDats", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ImportRoms {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportRoms", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ExportDat {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportDat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RemoveDat {
|
||||
get {
|
||||
return ResourceManager.GetString("RemoveDat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ExportRoms {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportRoms", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
108
RomRepoMgr.Blazor/Resources/Localization.es.resx
Normal file
108
RomRepoMgr.Blazor/Resources/Localization.es.resx
Normal file
@@ -0,0 +1,108 @@
|
||||
<root>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
|
||||
PublicKeyToken=b77a5c561934e089
|
||||
</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
|
||||
PublicKeyToken=b77a5c561934e089
|
||||
</value>
|
||||
</resheader>
|
||||
<data name="ROMs_will_be_imported_from" xml:space="preserve">
|
||||
<value>Las ROMs se importarán de {0}.</value>
|
||||
</data>
|
||||
<data name="DATs_will_be_imported_from" xml:space="preserve">
|
||||
<value>Los ficheros DAT se importarán de {0}.</value>
|
||||
</data>
|
||||
<data name="Close" xml:space="preserve">
|
||||
<value>Cerrar</value>
|
||||
</data>
|
||||
<data name="ExportDat" xml:space="preserve">
|
||||
<value>Exportar DAT</value>
|
||||
</data>
|
||||
<data name="ExportRoms" xml:space="preserve">
|
||||
<value>Exportar ROMs</value>
|
||||
</data>
|
||||
<data name="Finished" xml:space="preserve">
|
||||
<value>Terminado</value>
|
||||
</data>
|
||||
<data name="HomepageLabel" xml:space="preserve">
|
||||
<value>Página web</value>
|
||||
</data>
|
||||
<data name="ImportingItem" xml:space="preserve">
|
||||
<value>Importando {0}...</value>
|
||||
</data>
|
||||
<data name="ImportRoms" xml:space="preserve">
|
||||
<value>Importar ROMs</value>
|
||||
</data>
|
||||
<data name="KnownOnlyLabel" xml:space="preserve">
|
||||
<value>Importar solo archivos conocidos.</value>
|
||||
</data>
|
||||
<data name="ProcessingArchive" xml:space="preserve">
|
||||
<value>Procesando archivo: {0}</value>
|
||||
</data>
|
||||
<data name="RecurseArchivesLabel" xml:space="preserve">
|
||||
<value>Intentar detectar archivos comprimiedos e importar su contenido.</value>
|
||||
</data>
|
||||
<data name="RemoveDat" xml:space="preserve">
|
||||
<value>Eliminar DAT</value>
|
||||
</data>
|
||||
<data name="RemoveFilesLabel" xml:space="preserve">
|
||||
<value>Eliminar archivos después de importar satisfactoriamente.</value>
|
||||
</data>
|
||||
<data name="RomSetNameLabel" xml:space="preserve">
|
||||
<value>Nombre</value>
|
||||
</data>
|
||||
<data name="RomSetMissRomsLabel" xml:space="preserve">
|
||||
<value>Faltantes</value>
|
||||
</data>
|
||||
<data name="RomSetIncompleteMachinesLabel" xml:space="preserve">
|
||||
<value>Incompletos</value>
|
||||
</data>
|
||||
<data name="RomSetHaveRomsLabel" xml:space="preserve">
|
||||
<value>Presentes</value>
|
||||
</data>
|
||||
<data name="RomSetDescriptionLabel" xml:space="preserve">
|
||||
<value>Descripción</value>
|
||||
</data>
|
||||
<data name="RomSetDateLabel" xml:space="preserve">
|
||||
<value>Incompletos</value>
|
||||
</data>
|
||||
<data name="RomSetCompleteMachinesLabel" xml:space="preserve">
|
||||
<value>Completos</value>
|
||||
</data>
|
||||
<data name="RomSetCommentLabel" xml:space="preserve">
|
||||
<value>Comentario</value>
|
||||
</data>
|
||||
<data name="RomSetCategoryLabel" xml:space="preserve">
|
||||
<value>Categoría</value>
|
||||
</data>
|
||||
<data name="RomSetAuthorLabel" xml:space="preserve">
|
||||
<value>Categoría</value>
|
||||
</data>
|
||||
<data name="RomSetTotalMachinesLabel" xml:space="preserve">
|
||||
<value>Juegos</value>
|
||||
</data>
|
||||
<data name="RomSetTotalRomsLabel" xml:space="preserve">
|
||||
<value>ROMs</value>
|
||||
</data>
|
||||
<data name="RomSetVersionLabel" xml:space="preserve">
|
||||
<value>Versión</value>
|
||||
</data>
|
||||
<data name="SearchingForFiles" xml:space="preserve">
|
||||
<value>Buscando archivos...</value>
|
||||
</data>
|
||||
<data name="Start" xml:space="preserve">
|
||||
<value>Comenzar</value>
|
||||
</data>
|
||||
<data name="ImportDats" xml:space="preserve">
|
||||
<value>Importar DATs</value>
|
||||
</data>
|
||||
</root>
|
||||
117
RomRepoMgr.Blazor/Resources/Localization.resx
Normal file
117
RomRepoMgr.Blazor/Resources/Localization.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<root>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
|
||||
id="root"
|
||||
xmlns="">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
|
||||
PublicKeyToken=b77a5c561934e089
|
||||
</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
|
||||
PublicKeyToken=b77a5c561934e089
|
||||
</value>
|
||||
</resheader>
|
||||
<data name="ROMs_will_be_imported_from" xml:space="preserve">
|
||||
<value>ROM files will be imported from {0}.</value>
|
||||
</data>
|
||||
<data name="RemoveFilesLabel" xml:space="preserve">
|
||||
<value>Remove files after import successful.</value>
|
||||
</data>
|
||||
<data name="KnownOnlyLabel" xml:space="preserve">
|
||||
<value>Only import known files.</value>
|
||||
</data>
|
||||
<data name="RecurseArchivesLabel" xml:space="preserve">
|
||||
<value>Try to detect archives and import their contents.</value>
|
||||
</data>
|
||||
<data name="Start" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="Close" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
</data>
|
||||
<data name="ImportingItem" xml:space="preserve">
|
||||
<value>Importing {0}...</value>
|
||||
</data>
|
||||
<data name="ProcessingArchive" xml:space="preserve">
|
||||
<value>Processing archive: {0}</value>
|
||||
</data>
|
||||
<data name="Finished" xml:space="preserve">
|
||||
<value>Finished</value>
|
||||
</data>
|
||||
<data name="DATs_will_be_imported_from" xml:space="preserve">
|
||||
<value>DAT files will be imported from {0}.</value>
|
||||
</data>
|
||||
<data name="SearchingForFiles" xml:space="preserve">
|
||||
<value>Searching for files...</value>
|
||||
</data>
|
||||
<data name="RomSetNameLabel" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="RomSetVersionLabel" xml:space="preserve">
|
||||
<value>Version</value>
|
||||
</data>
|
||||
<data name="RomSetAuthorLabel" xml:space="preserve">
|
||||
<value>Author</value>
|
||||
</data>
|
||||
<data name="RomSetCategoryLabel" xml:space="preserve">
|
||||
<value>Category</value>
|
||||
</data>
|
||||
<data name="RomSetDateLabel" xml:space="preserve">
|
||||
<value>Date</value>
|
||||
</data>
|
||||
<data name="RomSetDescriptionLabel" xml:space="preserve">
|
||||
<value>Description</value>
|
||||
</data>
|
||||
<data name="RomSetCommentLabel" xml:space="preserve">
|
||||
<value>Comment</value>
|
||||
</data>
|
||||
<data name="HomepageLabel" xml:space="preserve">
|
||||
<value>Homepage</value>
|
||||
</data>
|
||||
<data name="RomSetTotalMachinesLabel" xml:space="preserve">
|
||||
<value>Games</value>
|
||||
</data>
|
||||
<data name="RomSetCompleteMachinesLabel" xml:space="preserve">
|
||||
<value>Complete</value>
|
||||
</data>
|
||||
<data name="RomSetIncompleteMachinesLabel" xml:space="preserve">
|
||||
<value>Incomplete</value>
|
||||
</data>
|
||||
<data name="RomSetTotalRomsLabel" xml:space="preserve">
|
||||
<value>ROMs</value>
|
||||
</data>
|
||||
<data name="RomSetHaveRomsLabel" xml:space="preserve">
|
||||
<value>Have</value>
|
||||
</data>
|
||||
<data name="RomSetMissRomsLabel" xml:space="preserve">
|
||||
<value>Miss</value>
|
||||
</data>
|
||||
<data name="ImportDats" xml:space="preserve">
|
||||
<value>Import DATs</value>
|
||||
</data>
|
||||
<data name="ImportRoms" xml:space="preserve">
|
||||
<value>Import ROMs</value>
|
||||
</data>
|
||||
<data name="ExportDat" xml:space="preserve">
|
||||
<value>Export DAT</value>
|
||||
</data>
|
||||
<data name="RemoveDat" xml:space="preserve">
|
||||
<value>Remove DAT</value>
|
||||
</data>
|
||||
<data name="ExportRoms" xml:space="preserve">
|
||||
<value>Export ROMs</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -8,10 +8,12 @@
|
||||
<SelfContained>true</SelfContained>
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
||||
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Localization"/>
|
||||
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components"/>
|
||||
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter"/>
|
||||
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons"/>
|
||||
@@ -24,4 +26,19 @@
|
||||
<ProjectReference Include="..\RomRepoMgr.Core\RomRepoMgr.Core.csproj"/>
|
||||
<ProjectReference Include="..\RomRepoMgr.Database\RomRepoMgr.Database.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Resources\Localization.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Localization.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Resources\Localization.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Localization.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning",
|
||||
"Microsoft": "Debug",
|
||||
"Microsoft.Extensions.Localization": "Debug"
|
||||
}
|
||||
},
|
||||
"CircuitOptions": {
|
||||
|
||||
Reference in New Issue
Block a user