@if (item.IsActive)
{
diff --git a/src/Web/AdminPanel/Pages/CreateConnectServerConfig.razor.cs b/src/Web/AdminPanel/Pages/CreateConnectServerConfig.razor.cs
index 0489c528e3..af879c8fde 100644
--- a/src/Web/AdminPanel/Pages/CreateConnectServerConfig.razor.cs
+++ b/src/Web/AdminPanel/Pages/CreateConnectServerConfig.razor.cs
@@ -190,23 +190,27 @@ public class ConnectServerViewModel
///
/// Gets or sets the server identifier.
///
+ [Display(Name = nameof(Resources.CreateConnectServer_ServerId), ResourceType = typeof(Resources))]
public byte ServerId { get; set; }
///
/// Gets or sets the description.
///
+ [Display(Name = nameof(Resources.CreateConnectServer_Description), ResourceType = typeof(Resources))]
public string Description { get; set; } = string.Empty;
///
/// Gets or sets the client which is expected to connect.
///
[Required]
+ [Display(Name = nameof(Resources.CreateConnectServer_Client), ResourceType = typeof(Resources))]
public GameClientDefinition? Client { get; set; }
///
/// Gets or sets the network port on which the server is listening.
///
[Range(1, ushort.MaxValue)]
+ [Display(Name = nameof(Resources.CreateConnectServer_NetworkPort), ResourceType = typeof(Resources))]
public int NetworkPort { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Web/AdminPanel/Pages/CreateGameServerConfig.razor.cs b/src/Web/AdminPanel/Pages/CreateGameServerConfig.razor.cs
index 87ee740ec3..d49dc7be92 100644
--- a/src/Web/AdminPanel/Pages/CreateGameServerConfig.razor.cs
+++ b/src/Web/AdminPanel/Pages/CreateGameServerConfig.razor.cs
@@ -206,11 +206,13 @@ public class GameServerViewModel
///
/// Gets or sets the server identifier.
///
+ [Display(Name = nameof(Resources.CreateGameServer_ServerId), ResourceType = typeof(Resources))]
public byte ServerId { get; set; }
///
/// Gets or sets the description.
///
+ [Display(Name = nameof(Resources.CreateGameServer_Description), ResourceType = typeof(Resources))]
public string Description { get; set; } = string.Empty;
///
@@ -220,29 +222,34 @@ public class GameServerViewModel
/// The experience rate.
///
[Range(0, float.MaxValue)]
+ [Display(Name = nameof(Resources.CreateGameServer_ExperienceRate), ResourceType = typeof(Resources))]
public float ExperienceRate { get; set; }
///
/// Gets or sets a value indicating whether PVP is enabled on this server.
///
+ [Display(Name = nameof(Resources.CreateGameServer_PvpEnabled), ResourceType = typeof(Resources))]
public bool PvpEnabled { get; set; }
///
/// Gets or sets the server configuration.
///
[Required]
+ [Display(Name = nameof(Resources.CreateGameServer_ServerConfiguration), ResourceType = typeof(Resources))]
public GameServerConfiguration? ServerConfiguration { get; set; }
///
/// Gets or sets the client which is expected to connect.
///
[Required]
+ [Display(Name = nameof(Resources.CreateGameServer_Client), ResourceType = typeof(Resources))]
public GameClientDefinition? Client { get; set; }
///
/// Gets or sets the network port on which the server is listening.
///
[Range(1, ushort.MaxValue)]
+ [Display(Name = nameof(Resources.CreateGameServer_NetworkPort), ResourceType = typeof(Resources))]
public int NetworkPort { get; set; }
}
}
diff --git a/src/Web/AdminPanel/Pages/EditConfigGrid.razor b/src/Web/AdminPanel/Pages/EditConfigGrid.razor
index 5648713c4c..bb51d3c60b 100644
--- a/src/Web/AdminPanel/Pages/EditConfigGrid.razor
+++ b/src/Web/AdminPanel/Pages/EditConfigGrid.razor
@@ -20,7 +20,7 @@
-
+
-
+
diff --git a/src/Web/AdminPanel/Pages/EditConfigGrid.razor.cs b/src/Web/AdminPanel/Pages/EditConfigGrid.razor.cs
index e95056ec9a..d152f9c6b4 100644
--- a/src/Web/AdminPanel/Pages/EditConfigGrid.razor.cs
+++ b/src/Web/AdminPanel/Pages/EditConfigGrid.razor.cs
@@ -193,7 +193,7 @@ private async Task OnDeleteButtonClickAsync(ViewModel viewModel)
{
try
{
- var dialogResult = await this.ModalService.ShowQuestionAsync("Are you sure?", $"You're about to delete '{viewModel.Name}. Are you sure?").ConfigureAwait(true);
+ var dialogResult = await this.ModalService.ShowQuestionAsync(Resources.ConfirmDelete, string.Format(Resources.ConfirmDeleteEntry, viewModel.Name)).ConfigureAwait(true);
if (!dialogResult)
{
return;
@@ -212,7 +212,7 @@ private async Task OnDeleteButtonClickAsync(ViewModel viewModel)
await deleteContext.DeleteAsync(toDelete).ConfigureAwait(false);
await deleteContext.SaveChangesAsync(cancellationToken).ConfigureAwait(false);
await this.DataSource.ForceDiscardChangesAsync().ConfigureAwait(false);
- this.ToastService.ShowSuccess($"Deleted '{viewModel.Name}' successfully.");
+ this.ToastService.ShowSuccess(string.Format(Resources.DeletedSuccessfully, viewModel.Name));
this._viewModels = null;
this._loadTask = Task.Run(() => this.LoadDataAsync(cancellationToken), cancellationToken);
}
@@ -234,7 +234,7 @@ private async Task OnCreateButtonClickAsync()
var session = new CreationSession
{
- Title = $"Create {this.Type!.GetTypeCaption()}",
+ Title = string.Format(Resources.CreateEntry, this.Type!.GetTypeCaption()),
Item = newObject,
ItemType = this.Type!,
Context = creationContext,
@@ -303,7 +303,7 @@ private async Task OnDuplicateButtonClickAsync(ViewModel viewModel)
var duplicatedName = viewModel.Name;
var session = new CreationSession
{
- Title = $"Duplicate '{duplicatedName}'",
+ Title = string.Format(Resources.DuplicateEntry, duplicatedName),
Item = newObject,
ItemType = this.Type!,
Context = context,
@@ -378,7 +378,7 @@ private async Task OnDuplicateButtonClickAsync(ViewModel viewModel)
if (cloneMethod is null || !this.Type.IsAssignableFrom(cloneMethod.ReturnType))
{
- this.ToastService.ShowError($"Type '{this.Type.Name}' must have a Clone method that takes '{nameof(GameConfiguration)}' and returns '{this.Type.Name}'.");
+ this.ToastService.ShowError(string.Format(Resources.InvalidCloneMethod, this.Type.Name, nameof(GameConfiguration)));
return null;
}
@@ -488,6 +488,7 @@ public ViewModel(object parent)
///
/// Gets or sets the name of the object.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(Resources.ConfigurationEntryName), ResourceType = typeof(Resources))]
public string Name { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Web/AdminPanel/Pages/Index.razor b/src/Web/AdminPanel/Pages/Index.razor
index b09490d450..db3adcd49d 100644
--- a/src/Web/AdminPanel/Pages/Index.razor
+++ b/src/Web/AdminPanel/Pages/Index.razor
@@ -4,6 +4,6 @@
\ No newline at end of file
diff --git a/src/Web/AdminPanel/Pages/Plugins.razor b/src/Web/AdminPanel/Pages/Plugins.razor
index 13ebed14b5..b7748e6649 100644
--- a/src/Web/AdminPanel/Pages/Plugins.razor
+++ b/src/Web/AdminPanel/Pages/Plugins.razor
@@ -17,8 +17,8 @@
\ No newline at end of file
diff --git a/src/Web/Shared/Components/ItemEdit/ItemViewModel.cs b/src/Web/Shared/Components/ItemEdit/ItemViewModel.cs
index 097380eb5c..0d6517db2e 100644
--- a/src/Web/Shared/Components/ItemEdit/ItemViewModel.cs
+++ b/src/Web/Shared/Components/ItemEdit/ItemViewModel.cs
@@ -59,6 +59,7 @@ public ItemViewModel(Item item, IContext persistenceContext)
///
/// Gets or sets the item slot.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_ItemSlot), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public byte ItemSlot
{
get => this.Item.ItemSlot;
@@ -77,6 +78,7 @@ public byte ItemSlot
///
/// Gets or sets the definition.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_Definition), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public ItemDefinition? Definition
{
get => this.Item.Definition;
@@ -96,6 +98,7 @@ public ItemDefinition? Definition
///
/// Gets or sets the level.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_Level), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public byte Level
{
get => this.Item.Level;
@@ -119,6 +122,7 @@ public byte Level
///
/// Gets or sets the amount for items which are not wearable.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_Amount), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public byte Amount
{
get => (byte)this.Durability;
@@ -128,6 +132,7 @@ public byte Amount
///
/// Gets or sets the durability.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_Durability), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public double Durability
{
get => this.Item.Durability;
@@ -148,6 +153,7 @@ public double Durability
///
/// Gets or sets a value indicating whether this item has skill.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_HasSkill), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public bool HasSkill
{
get => this.Item.HasSkill;
@@ -166,6 +172,7 @@ public bool HasSkill
///
/// Gets or sets a value indicating whether this item has luck.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_HasLuck), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public bool HasLuck
{
get => this.Item.ItemOptions.Any(io => io.ItemOption?.OptionType == ItemOptionTypes.Luck);
@@ -202,6 +209,7 @@ public bool HasLuck
///
/// Gets or sets a value indicating whether this item has guardian option.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_HasGuardianOption), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public bool HasGuardianOption
{
get => this.Item.ItemOptions.Any(io => io.ItemOption?.OptionType == ItemOptionTypes.GuardianOption);
@@ -253,6 +261,7 @@ public IncreasableItemOption? PossibleLuckOption
///
/// Gets or sets the normal option, if assigned.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_NormalOption), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public IncreasableItemOption? NormalOption
{
get => this.NormalOptionLink?.ItemOption;
@@ -293,6 +302,7 @@ public IncreasableItemOption? NormalOption
///
/// Gets or sets the normal option, if assigned.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_HarmonyOption), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public IncreasableItemOption? HarmonyOption
{
get => this.HarmonyOptionLink?.ItemOption;
@@ -329,6 +339,7 @@ public IncreasableItemOption? HarmonyOption
///
/// Gets or sets the socket bonus option.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_SocketBonusOption), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public IncreasableItemOption? SocketBonusOption
{
get => this.SocketBonusOptionLink?.ItemOption;
@@ -364,6 +375,7 @@ public IncreasableItemOption? SocketBonusOption
///
/// Gets or sets the fenrir option.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_FenrirOption), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public ItemOptionType? FenrirOption
{
get => this.FenrirOptionLinks.FirstOrDefault()?.ItemOption?.OptionType;
@@ -393,6 +405,7 @@ public ItemOptionType? FenrirOption
/// Gets or sets a value indicating whether this item has a "normal" option.
/// It comes to action when there is just one possible option.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_HasOption), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public bool HasOption
{
get => this.NormalOption is { };
@@ -412,6 +425,7 @@ public bool HasOption
///
/// Gets or sets the socket count.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_SocketCount), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public int SocketCount
{
get => this.Item.SocketCount;
@@ -455,6 +469,7 @@ public int SocketCount
///
/// Gets or sets the pet experience.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_PetExperience), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public int PetExperience
{
get => this.Item.PetExperience;
@@ -473,16 +488,19 @@ public int PetExperience
///
/// Gets or sets the excellent options.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_ExcellentOptions), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public IList ExcellentOptions { get; set; }
///
/// Gets or sets the wing options.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_WingOptions), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public IList WingOptions { get; set; }
///
/// Gets or sets the ancient set.
///
+ [System.ComponentModel.DataAnnotations.Display(Name = nameof(MUnique.OpenMU.Web.Shared.Properties.Resources.ItemEdit_AncientSet), ResourceType = typeof(MUnique.OpenMU.Web.Shared.Properties.Resources))]
public ItemSetGroup? AncientSet
{
get => this.ItemSetGroups.FirstOrDefault(io => io.AncientSetDiscriminator > 0)?.ItemSetGroup;
diff --git a/src/Web/Shared/Components/LocalizedPaginator.razor b/src/Web/Shared/Components/LocalizedPaginator.razor
new file mode 100644
index 0000000000..82651e2b13
--- /dev/null
+++ b/src/Web/Shared/Components/LocalizedPaginator.razor
@@ -0,0 +1,51 @@
+@using Microsoft.AspNetCore.Components.QuickGrid
+@using MUnique.OpenMU.Web.Shared.Properties
+@implements IDisposable
+
+@if (State.TotalItemCount is { } count)
+{
+