From 39c17379029488f7639f9179f359fff6c25ae5ce Mon Sep 17 00:00:00 2001 From: "Ignaz \"Ian\" Kraft" Date: Thu, 23 Jan 2025 11:08:40 +0100 Subject: [PATCH] pluralize the job name in the contra description (#34559) * pluralize the job name in the contra description * pluralization specific to contraband descriptions --- Content.Shared/Contraband/ContrabandSystem.cs | 4 ++-- Resources/Locale/en-US/contraband/contraband-severity.ftl | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Contraband/ContrabandSystem.cs b/Content.Shared/Contraband/ContrabandSystem.cs index 811ea53567..48055fc3de 100644 --- a/Content.Shared/Contraband/ContrabandSystem.cs +++ b/Content.Shared/Contraband/ContrabandSystem.cs @@ -56,8 +56,8 @@ public sealed class ContrabandSystem : EntitySystem using (args.PushGroup(nameof(ContrabandComponent))) { // TODO shouldn't department prototypes have a localized name instead of just using the ID for this? - var localizedDepartments = ent.Comp.AllowedDepartments.Select(p => Loc.GetString($"department-{p.Id}")); - var localizedJobs = ent.Comp.AllowedJobs.Select(p => _proto.Index(p).LocalizedName); + var localizedDepartments = ent.Comp.AllowedDepartments.Select(p => Loc.GetString("contraband-department-plural", ("department", Loc.GetString($"department-{p.Id}")))); + var localizedJobs = ent.Comp.AllowedJobs.Select(p => Loc.GetString("contraband-job-plural", ("job", _proto.Index(p).LocalizedName))); var severity = _proto.Index(ent.Comp.Severity); if (severity.ShowDepartmentsAndJobs) diff --git a/Resources/Locale/en-US/contraband/contraband-severity.ftl b/Resources/Locale/en-US/contraband/contraband-severity.ftl index 303cb7c1d5..68bb11930a 100644 --- a/Resources/Locale/en-US/contraband/contraband-severity.ftl +++ b/Resources/Locale/en-US/contraband/contraband-severity.ftl @@ -7,3 +7,6 @@ contraband-examine-text-Syndicate = [color=crimson]This item is highly illegal S contraband-examine-text-avoid-carrying-around = [color=red][italic]You probably want to avoid visibly carrying this around without a good reason.[/italic][/color] contraband-examine-text-in-the-clear = [color=green][italic]You should be in the clear to visibly carry this around.[/italic][/color] + +contraband-department-plural = {$department} +contraband-job-plural = {MAKEPLURAL($job)} -- 2.51.2