Added damage type localization for health analyzer (#10249)

This commit is contained in:
Rinkashikachi
2022-08-02 17:04:10 +03:00
committed by GitHub
parent bba5850da4
commit 0a64eb98cf
2 changed files with 25 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ namespace Content.Client.HealthAnalyzer.UI
// Show the total damage and type breakdown for each damage group.
foreach (var (damageGroupId, damageAmount) in DamagePerGroup)
{
text.Append($"\n{Loc.GetString("health-analyzer-window-damage-group-text", ("damageGroup", damageGroupId), ("amount", damageAmount))}");
text.Append($"\n{Loc.GetString("health-analyzer-window-damage-group-text", ("damageGroup", Loc.GetString("health-analyzer-window-damage-group-" + damageGroupId)), ("amount", damageAmount))}");
// Show the damage for each type in that group.
var group = protos.Index<DamageGroupPrototype>(damageGroupId);
foreach (var type in group.DamageTypes)
@@ -67,7 +67,7 @@ namespace Content.Client.HealthAnalyzer.UI
if (!shownTypes.Contains(type))
{
shownTypes.Add(type);
text.Append($"\n- {Loc.GetString("health-analyzer-window-damage-type-text", ("damageType", type), ("amount", typeAmount))}");
text.Append($"\n- {Loc.GetString("health-analyzer-window-damage-type-text", ("damageType", Loc.GetString("health-analyzer-window-damage-type-" + type)), ("amount", typeAmount))}");
}
}
}