]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
pluralize the job name in the contra description (#34559)
authorIgnaz "Ian" Kraft <ignaz.k@live.de>
Thu, 23 Jan 2025 10:08:40 +0000 (11:08 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Jan 2025 10:08:40 +0000 (11:08 +0100)
* pluralize the job name in the contra description

* pluralization specific to contraband descriptions

Content.Shared/Contraband/ContrabandSystem.cs
Resources/Locale/en-US/contraband/contraband-severity.ftl

index 811ea5356757c99505d28b3047f28a3187ec3635..48055fc3de64d9dc72d4ea4f2182d580bd332be1 100644 (file)
@@ -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)
index 303cb7c1d517922c5aff5f0cbfd444c82a358c99..68bb11930a0e108f602b98b70e6fd4855e9c3b6d 100644 (file)
@@ -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)}