From 1abd2d3a0878422b1f30b61570f5d09c06e8cc9f Mon Sep 17 00:00:00 2001 From: MilenVolf <63782763+MilenVolf@users.noreply.github.com> Date: Sat, 8 Mar 2025 22:04:26 +0300 Subject: [PATCH] Localize all dataset names (#32893) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use `LocalizedDatasetPrototype` instead of `DatasetPrototype` in `RoleLoadoutPrototype` * Localize ai names * Replace to `LocalizedDatasetPrototype` in `NamingSystem` * Localize arachnid first and last names * Localize atv names * Localize autoborg names * Forgot to change type to localizedDataset * Localize borer names * Localize borg names * Localize cargo shuttle names * Localize clown names * Localize death_commando names * Localize diona names * Localize fake_human names * Localize first and last names * Localize first male and female names * Localize fortunes descriptions * Forgot about equal sign * Localize golem names * Localize hologram names * Localize military names * Localize moth first male and female names * Localize moth last names * Fix autoborg name error * Localize mushman first and last names * Localize ninja names * Localize operation names * Localize regalrat names * Fix mushman_first * Forgot about `Loc.GetString` * Move comments into comment section & fix names * Localize reptilian male and female names * Localize revenant names * Fix locale word order in operation * Localize rollie (btw it was never used and was added as "for the futuгe" long time ago) * Localize skeleton_first names * Localize syndicate names * Localize vox names * Localize wizard first and last names * `{owner}-name-dataset` -> `names-{owner}-dataset` * Change `DatasetPrototype` to `LocalizedDatasetPrototype` and make sure it works properly GetFTLName is no more the static method, we need it to be able to use `Loc.GetString` * I hate those mothname comments * Combine name datasets prototypes * Move every ftl from` /en-US/names` to ` /en-US/datasets/names` * Remove ftl files * Get every dataset yml back * Remove changes for planets. Move it in another PR * Revert these changes (Moved to another PR) * How * Apply suggested changes --- Content.Shared/Humanoid/NamingSystem.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Content.Shared/Humanoid/NamingSystem.cs b/Content.Shared/Humanoid/NamingSystem.cs index 76487ff522..f3af6b5aa1 100644 --- a/Content.Shared/Humanoid/NamingSystem.cs +++ b/Content.Shared/Humanoid/NamingSystem.cs @@ -1,5 +1,6 @@ using Content.Shared.Humanoid.Prototypes; using Content.Shared.Dataset; +using Content.Shared.Random.Helpers; using Robust.Shared.Random; using Robust.Shared.Prototypes; using Robust.Shared.Enums; @@ -47,20 +48,20 @@ namespace Content.Shared.Humanoid switch (gender) { case Gender.Male: - return _random.Pick(_prototypeManager.Index(speciesProto.MaleFirstNames).Values); + return _random.Pick(_prototypeManager.Index(speciesProto.MaleFirstNames)); case Gender.Female: - return _random.Pick(_prototypeManager.Index(speciesProto.FemaleFirstNames).Values); + return _random.Pick(_prototypeManager.Index(speciesProto.FemaleFirstNames)); default: if (_random.Prob(0.5f)) - return _random.Pick(_prototypeManager.Index(speciesProto.MaleFirstNames).Values); + return _random.Pick(_prototypeManager.Index(speciesProto.MaleFirstNames)); else - return _random.Pick(_prototypeManager.Index(speciesProto.FemaleFirstNames).Values); + return _random.Pick(_prototypeManager.Index(speciesProto.FemaleFirstNames)); } } public string GetLastName(SpeciesPrototype speciesProto) { - return _random.Pick(_prototypeManager.Index(speciesProto.LastNames).Values); + return Loc.GetString(_random.Pick(_prototypeManager.Index(speciesProto.LastNames).Values)); } } }