Technology localization (#10252)

This commit is contained in:
Rinkashikachi
2022-08-08 11:40:20 +03:00
committed by GitHub
parent 3e4fd416ab
commit df681f98aa
3 changed files with 113 additions and 42 deletions

View File

@@ -20,7 +20,13 @@ namespace Content.Shared.Research.Prototypes
/// </summary>
[ViewVariables]
[DataField("name")]
public string Name { get; } = string.Empty;
public string Name
{
get => (_name is not null) ? _name : ID;
private set => _name = Loc.GetString(value);
}
private string? _name;
/// <summary>
/// An icon that represent this technology.
@@ -33,7 +39,13 @@ namespace Content.Shared.Research.Prototypes
/// </summary>
[ViewVariables]
[DataField("description")]
public string Description { get; } = string.Empty;
public string Description
{
get => (_description is not null) ? _description : "";
private set => _description = Loc.GetString(value);
}
private string? _description;
/// <summary>
/// The required research points to unlock this technology.