mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 11:40:52 +01:00
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
24 lines
547 B
C#
24 lines
547 B
C#
using JetBrains.Annotations;
|
|
using Robust.Shared.Localization;
|
|
|
|
namespace Robust.Client.UserInterface
|
|
{
|
|
// TODO: Code a XAML compiler transformer to remove references to this type at compile time.
|
|
// And just replace them with the Loc.GetString() call.
|
|
[PublicAPI]
|
|
public sealed class LocExtension
|
|
{
|
|
public string Key { get; }
|
|
|
|
public LocExtension(string key)
|
|
{
|
|
Key = key;
|
|
}
|
|
|
|
public object ProvideValue()
|
|
{
|
|
return Loc.GetString(Key);
|
|
}
|
|
}
|
|
}
|