Localization of steal targets (#30153)
* Localization of steal targets * Correction of localization of theft objects * The second correction of the localization of theft targets * Update steal-target-groups.ftl Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com> * Revision of the localization method * Choosing a simple option for localization * Fix TechnologyDisk name * Corrections based on feedback received * correction of declension --------- Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
This commit is contained in:
@@ -72,14 +72,15 @@ public sealed class StealConditionSystem : EntitySystem
|
||||
private void OnAfterAssign(Entity<StealConditionComponent> condition, ref ObjectiveAfterAssignEvent args)
|
||||
{
|
||||
var group = _proto.Index(condition.Comp.StealGroup);
|
||||
string localizedName = Loc.GetString(group.Name);
|
||||
|
||||
var title =condition.Comp.OwnerText == null
|
||||
? Loc.GetString(condition.Comp.ObjectiveNoOwnerText, ("itemName", group.Name))
|
||||
: Loc.GetString(condition.Comp.ObjectiveText, ("owner", Loc.GetString(condition.Comp.OwnerText)), ("itemName", group.Name));
|
||||
? Loc.GetString(condition.Comp.ObjectiveNoOwnerText, ("itemName", localizedName))
|
||||
: Loc.GetString(condition.Comp.ObjectiveText, ("owner", Loc.GetString(condition.Comp.OwnerText)), ("itemName", localizedName));
|
||||
|
||||
var description = condition.Comp.CollectionSize > 1
|
||||
? Loc.GetString(condition.Comp.DescriptionMultiplyText, ("itemName", group.Name), ("count", condition.Comp.CollectionSize))
|
||||
: Loc.GetString(condition.Comp.DescriptionText, ("itemName", group.Name));
|
||||
? Loc.GetString(condition.Comp.DescriptionMultiplyText, ("itemName", localizedName), ("count", condition.Comp.CollectionSize))
|
||||
: Loc.GetString(condition.Comp.DescriptionText, ("itemName", localizedName));
|
||||
|
||||
_metaData.SetEntityName(condition.Owner, title, args.Meta);
|
||||
_metaData.SetEntityDescription(condition.Owner, description, args.Meta);
|
||||
|
||||
Reference in New Issue
Block a user