Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c55fbe3
Added preferred language setting to account
sven-n Oct 19, 2025
bdaf8a8
Added resource file for player messages
sven-n Oct 19, 2025
325dc41
Localizable player messages and data model
sven-n Nov 27, 2025
21c0abc
Separated Name/Description of PlugInAttribute into DisplayAttribute
sven-n Dec 18, 2025
43a79d2
ResourceGenerator needs to runs deterministic
sven-n Dec 18, 2025
2d4ad28
Localized a player message
sven-n Dec 18, 2025
7e51440
Added resource strings in the admin panel
sven-n Dec 18, 2025
f3ff7d5
Merge branch 'master' into dev/multilanguage
sven-n Jan 2, 2026
90c9dcd
Implemented a culture selector component
sven-n Jan 7, 2026
10d9ba5
Text language should be based on UI-Culture
sven-n Jan 7, 2026
c59c330
Removed reference to missing js file
sven-n Jan 7, 2026
0e85ac0
Display localized plugin name and description
sven-n Jan 10, 2026
1c7fcd4
Transparent background for culture selector
sven-n Jan 10, 2026
a1cb873
Made plugin names and descriptions localizable
sven-n Jan 10, 2026
b64e696
More localizable resources
sven-n Jan 10, 2026
26c6a85
Consider DisplayAttribute in labels, too
sven-n Jan 11, 2026
7232551
More localizations
sven-n Jan 11, 2026
3bd1d3e
Implemented component to edit LocalizedString properties
sven-n Jan 15, 2026
aa319f8
build fix
sven-n Jan 15, 2026
65a417f
Renamed LocalizedStringConverter -> LocalizedStringJsonConverter
sven-n Jan 18, 2026
f2c3715
Text color for languages should be darker
sven-n Jan 18, 2026
2ef34ae
Adapted DataModel to use LocalizedString where applicable
sven-n Jan 19, 2026
968bdef
Sorted usings
sven-n Jan 19, 2026
99b76f4
build fix
sven-n Jan 19, 2026
be6778d
LocalizableException removed
sven-n Jan 22, 2026
fa6b3f7
Determine available languages automatically
sven-n Jan 22, 2026
c9b0787
Chat commands: Player messages instead of ArgumentExceptions
sven-n Jan 24, 2026
4e3e1cc
Removed unused descriptions of ChatCommandHelpAttribute
sven-n Jan 24, 2026
f4abf30
Fixed minor translation issues
sven-n Jan 24, 2026
614e484
Code style fixes suggested by Codacy
sven-n Jan 24, 2026
5db5b21
Code style fixes suggested by Codacy
sven-n Jan 24, 2026
729eda2
Merge branch 'master' into dev/multilanguage
sven-n Jan 25, 2026
1da6796
Adapted merged plugin from master
sven-n Jan 25, 2026
d3c1f0b
Fixed description of EndDuelWhenLeavingDuelMapPlugIn
sven-n Jan 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace MUnique.OpenMU.ChatServer.ExDbConnector;

using System.ComponentModel.DataAnnotations;
using System.IO.Pipelines;
using System.Runtime.InteropServices;
using MUnique.OpenMU.Network;
Expand All @@ -14,7 +15,8 @@ namespace MUnique.OpenMU.ChatServer.ExDbConnector;
/// <summary>
/// A configurable network encryption factory plugin which reads the Xor32 key from the ChatServer.cfg file. Only used by the ExDbConnector project.
/// </summary>
[PlugIn("Configurable encryption plugin", "A configurable network encryption factory plugin which reads the Xor32 key from the ChatServer.cfg file. Only used by the ExDbConnector project.")]
[PlugIn]
[Display(Name = "Configurable encryption plugin", Description = "A configurable network encryption factory plugin which reads the Xor32 key from the ChatServer.cfg file. Only used by the ExDbConnector project.")]
[Guid("890997B2-9334-4E9E-8C82-4492A831BCE3")]
public class ConfigurableNetworkEncryptionPlugIn : INetworkEncryptionFactoryPlugIn
{
Expand Down
8 changes: 7 additions & 1 deletion src/Dapr/Common/DaprService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ namespace MUnique.OpenMU.Dapr.Common;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;
using MUnique.OpenMU.Interfaces;
using MUnique.OpenMU.Persistence.EntityFramework;
using MUnique.OpenMU.Persistence.EntityFramework.Json;
using MUnique.OpenMU.PlugIns;
using OpenTelemetry.Logs;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
using MUnique.OpenMU.Persistence.EntityFramework;

/// <summary>
/// Helper class to create an <see cref="WebApplicationBuilder"/> which predefined common
Expand All @@ -30,6 +33,9 @@ public static class DaprService
/// </returns>
public static WebApplicationBuilder CreateBuilder(string serviceName, string[] args)
{
JsonConverterRegistry.RegisterConverter(new LocalizedStringJsonConverter());
JsonConverterRegistry.RegisterConverter(new BinaryAsHexJsonConverter());

var builder = WebApplication.CreateBuilder(args);

builder.WebHost.UseUrls($"http://*:8080");
Expand Down
6 changes: 3 additions & 3 deletions src/DataModel/Attributes/PowerUpDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public override string ToString()
var relation = this.Boost.RelatedValues.First();
if (relation.InputOperator == InputOperator.ExponentiateByAttribute)
{
value = relation.InputOperand + relation.InputOperator.AsString() + relation.InputAttribute?.Designation;
value = relation.InputOperand + relation.InputOperator.AsString() + new LocalizedString(relation.InputAttribute?.Designation).ToString();
}
else
{
value = relation.InputAttribute?.Designation + relation.InputOperator.AsString() + relation.InputOperand;
value = new LocalizedString(relation.InputAttribute?.Designation).ToString() + relation.InputOperator.AsString() + relation.InputOperand;
}
}
else
Expand All @@ -51,6 +51,6 @@ public override string ToString()
value = "0";
}

return value + " " + this.TargetAttribute?.Designation;
return value + " " + new LocalizedString(this.TargetAttribute?.Designation).ToString();
}
}
3 changes: 2 additions & 1 deletion src/DataModel/Configuration/CharacterClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace MUnique.OpenMU.DataModel.Configuration;
using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.AttributeSystem;
using MUnique.OpenMU.DataModel.Entities;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Defines a character class.
Expand All @@ -24,7 +25,7 @@ public partial class CharacterClass
/// <summary>
/// Gets or sets the name of the character class.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets a value indicating whether this character class can get created by the user.
Expand Down
6 changes: 4 additions & 2 deletions src/DataModel/Configuration/ConfigurationUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace MUnique.OpenMU.DataModel.Configuration;

using MUnique.OpenMU.Interfaces;

/// <summary>
/// Describes an applied configuration update.
/// Based on this information, the program can decide which updates are need to
Expand All @@ -21,12 +23,12 @@ public class ConfigurationUpdate
/// <summary>
/// Gets or sets the name of the update.
/// </summary>
public string? Name { get; set; }
public LocalizedString? Name { get; set; }

/// <summary>
/// Gets or sets the description of the update with further information.
/// </summary>
public string? Description { get; set; }
public LocalizedString? Description { get; set; }

/// <summary>
/// Gets or sets the release date.
Expand Down
2 changes: 1 addition & 1 deletion src/DataModel/Configuration/DropItemGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public partial class DropItemGroup
/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; } = string.Empty;
public LocalizedString Description { get; set; }

/// <summary>
/// Gets or sets the chance of the item drop group to apply. From 0.0 to 1.0.
Expand Down
2 changes: 1 addition & 1 deletion src/DataModel/Configuration/GameMapDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public partial class GameMapDefinition
/// <summary>
/// Gets or sets the name of the map.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets the terrain data.
Expand Down
3 changes: 2 additions & 1 deletion src/DataModel/Configuration/ItemCrafting/ItemCrafting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace MUnique.OpenMU.DataModel.Configuration.ItemCrafting;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Description of IItemCrafting.
Expand All @@ -23,7 +24,7 @@ public partial class ItemCrafting
/// <summary>
/// Gets or sets the name.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets the name of the item crafting handler class.
Expand Down
5 changes: 3 additions & 2 deletions src/DataModel/Configuration/Items/ItemDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace MUnique.OpenMU.DataModel.Configuration.Items;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.DataModel.Configuration;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Defines an item.
Expand Down Expand Up @@ -60,7 +61,7 @@ public partial class ItemDefinition
/// <summary>
/// Gets or sets the name of the item.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets the item drop level, which indicates the minimum monster lvl of which this item can be dropped.
Expand Down Expand Up @@ -165,7 +166,7 @@ public override string ToString()
/// <returns>The name of the item of a certain level.</returns>
public string GetNameForLevel(byte itemLevel)
{
var itemName = this.Name;
var itemName = this.Name.ToString();
if (itemName?.Contains(';') ?? false)
{
var tokens = itemName.Split(';');
Expand Down
5 changes: 3 additions & 2 deletions src/DataModel/Configuration/Items/ItemLevelBonusTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace MUnique.OpenMU.DataModel.Configuration.Items;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Defines a table of item level related bonus values for <see cref="ItemBasePowerUpDefinition"/>s.
Expand All @@ -15,12 +16,12 @@ public partial class ItemLevelBonusTable
/// <summary>
/// Gets or sets the name.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; } = string.Empty;
public LocalizedString Description { get; set; }

/// <summary>
/// Gets or sets the bonus per level.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace MUnique.OpenMU.DataModel.Configuration.Items;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.DataModel.Attributes;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Defines a bonus which gets granted when the equipped items
Expand All @@ -20,7 +21,7 @@ public partial class ItemOptionCombinationBonus
/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; } = string.Empty;
public LocalizedString Description { get; set; }

/// <summary>
/// Gets or sets the number.
Expand Down
3 changes: 2 additions & 1 deletion src/DataModel/Configuration/Items/ItemOptionDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace MUnique.OpenMU.DataModel.Configuration.Items;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// The definition of an item option.
Expand All @@ -15,7 +16,7 @@ public partial class ItemOptionDefinition
/// <summary>
/// Gets or sets the name of the option, for example "Luck", "Skill", "Normal Option".
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets a value indicating whether this option adds randomly.
Expand Down
5 changes: 3 additions & 2 deletions src/DataModel/Configuration/Items/ItemOptionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace MUnique.OpenMU.DataModel.Configuration.Items;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Type of an item option.
Expand All @@ -21,12 +22,12 @@ public partial class ItemOptionType
/// <summary>
/// Gets or sets the name.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; } = string.Empty;
public LocalizedString Description { get; set; }

/// <summary>
/// Gets or sets a value indicating whether this item option is visible to other players.
Expand Down
5 changes: 3 additions & 2 deletions src/DataModel/Configuration/Items/ItemSetGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace MUnique.OpenMU.DataModel.Configuration.Items;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.DataModel.Entities;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Defines an item set group. With (partial) completion of the set, additional options are getting applied.
Expand All @@ -26,7 +27,7 @@ public partial class ItemSetGroup
/// <value>
/// The name.
/// </value>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the options of this item set always apply to an item,
Expand All @@ -36,7 +37,7 @@ public partial class ItemSetGroup
public bool AlwaysApplies { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the items are counted distincly.
/// Gets or sets a value indicating whether the items are counted distinctly.
/// </summary>
/// <remarks>
/// For example, for the double wear bonus this has to be non-distinct, else we wouldn't get the bonus for wearing two of the same kind of swords.
Expand Down
3 changes: 2 additions & 1 deletion src/DataModel/Configuration/Items/ItemSlotType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace MUnique.OpenMU.DataModel.Configuration.Items;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// The item slot type. Each of this may have one or more actual item slots.
Expand All @@ -15,7 +16,7 @@ public partial class ItemSlotType
/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; } = string.Empty;
public LocalizedString Description { get; set; }

/// <summary>
/// Gets or sets the item slots of this slot type.
Expand Down
3 changes: 2 additions & 1 deletion src/DataModel/Configuration/MagicEffectDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace MUnique.OpenMU.DataModel.Configuration;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.DataModel.Attributes;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Magic Effect Definition. It can be an effect from a consumed item, a buff, or the result of an attack skill.
Expand All @@ -25,7 +26,7 @@ public partial class MagicEffectDefinition
/// <summary>
/// Gets or sets the name.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets the sub type.
Expand Down
8 changes: 3 additions & 5 deletions src/DataModel/Configuration/MasterSkillRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace MUnique.OpenMU.DataModel.Configuration;

using MUnique.OpenMU.Annotations;

/// <summary>
/// The root of a master skill tree. One character can have more than one root.
/// </summary>
Expand All @@ -20,11 +18,11 @@ public partial class MasterSkillRoot
/// <summary>
/// Gets or sets the name.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <inheritdoc />
public override string ToString()
public override string? ToString()
{
return this.Name;
return this.Name.ToString();
}
}
5 changes: 3 additions & 2 deletions src/DataModel/Configuration/MiniGameChangeEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace MUnique.OpenMU.DataModel.Configuration;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Defines the kind of targets for the <see cref="MiniGameChangeEvent"/>.
Expand Down Expand Up @@ -44,13 +45,13 @@ public partial class MiniGameChangeEvent
/// <summary>
/// Gets or sets the description about the event.
/// </summary>
public string? Description { get; set; }
public LocalizedString? Description { get; set; }

/// <summary>
/// Gets or sets the (golden) message which should be shown to the player.
/// One placeholder can be used to show the triggering player name.
/// </summary>
public string? Message { get; set; }
public LocalizedString? Message { get; set; }

/// <summary>
/// Gets or sets the targets which need to be killed to reach the required <see cref="NumberOfKills"/>.
Expand Down
4 changes: 2 additions & 2 deletions src/DataModel/Configuration/MiniGameDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public partial class MiniGameDefinition
/// <summary>
/// Gets or sets the name of the mini game.
/// </summary>
public string Name { get; set; } = string.Empty;
public LocalizedString Name { get; set; }

/// <summary>
/// Gets or sets the description of the mini game.
/// </summary>
public string Description { get; set; } = string.Empty;
public LocalizedString Description { get; set; }

/// <summary>
/// Gets or sets the level of the mini game.
Expand Down
5 changes: 3 additions & 2 deletions src/DataModel/Configuration/MiniGameSpawnWave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace MUnique.OpenMU.DataModel.Configuration;

using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.Interfaces;

/// <summary>
/// Defines a spawn wave of a <see cref="MiniGameDefinition"/>.
Expand All @@ -20,12 +21,12 @@ public partial class MiniGameSpawnWave
/// <summary>
/// Gets or sets the description about this wave.
/// </summary>
public string? Description { get; set; }
public LocalizedString? Description { get; set; }

/// <summary>
/// Gets or sets a message which is shown to the player when the wave starts.
/// </summary>
public string? Message { get; set; }
public LocalizedString? Message { get; set; }

/// <summary>
/// Gets or sets the starting time of the wave.
Expand Down
Loading
Loading