From a8d2903b94867e1f4cc620cc5942a5512034dcae Mon Sep 17 00:00:00 2001 From: Samuel Bouchet Date: Sun, 15 Mar 2026 19:25:05 +0100 Subject: [PATCH] Translate crafting workstation names in UI Workstation names were displayed as raw enum values (e.g. EngineerDesk). Add 32 workstation.* localization keys in both fr/en and use them in CraftingPanel and the craft.started event message. --- content/strings/en.json | 33 +++++++++++++++++++ content/strings/fr.json | 33 +++++++++++++++++++ src/OpenTheBox/Program.cs | 2 +- .../Rendering/Panels/CraftingPanel.cs | 2 +- 4 files changed, 68 insertions(+), 2 deletions(-) diff --git a/content/strings/en.json b/content/strings/en.json index 6766797..2d9f796 100644 --- a/content/strings/en.json +++ b/content/strings/en.json @@ -422,6 +422,39 @@ "craft.idle": "Waiting for ingredients", "craft.panel.empty": "No workshops unlocked.", + "workstation.Foundry": "Foundry", + "workstation.Workbench": "Workbench", + "workstation.Furnace": "Furnace", + "workstation.Loom": "Loom", + "workstation.Anvil": "Anvil", + "workstation.AlchemyTable": "Alchemy Table", + "workstation.Forge": "Forge", + "workstation.SawingPost": "Sawing Post", + "workstation.Windmill": "Windmill", + "workstation.Watermill": "Watermill", + "workstation.OilPress": "Oil Press", + "workstation.PotteryWorkshop": "Pottery Workshop", + "workstation.TailorTable": "Tailor Table", + "workstation.MortarAndPestle": "Mortar & Pestle", + "workstation.DyeBasin": "Dye Basin", + "workstation.Jewelry": "Jewelry", + "workstation.Smoker": "Smoker", + "workstation.BrewingVat": "Brewing Vat", + "workstation.EngineerDesk": "Engineer Desk", + "workstation.WeldingStation": "Welding Station", + "workstation.DrawingTable": "Drawing Table", + "workstation.EngravingBench": "Engraving Bench", + "workstation.SewingPost": "Sewing Post", + "workstation.MagicCauldron": "Magic Cauldron", + "workstation.TransformationPentacle": "Transformation Pentacle", + "workstation.PaintingSpace": "Painting Space", + "workstation.Distillery": "Distillery", + "workstation.Printer3D": "3D Printer", + "workstation.MatterSynthesizer": "Matter Synthesizer", + "workstation.GeneticModStation": "Genetic Mod Station", + "workstation.TemporalBracelet": "Temporal Bracelet", + "workstation.StasisChamber": "Stasis Chamber", + "item.blueprint.foundry": "Foundry Blueprint", "item.blueprint.workbench": "Workbench Blueprint", "item.blueprint.furnace": "Furnace Blueprint", diff --git a/content/strings/fr.json b/content/strings/fr.json index 2b0bad2..45dd915 100644 --- a/content/strings/fr.json +++ b/content/strings/fr.json @@ -422,6 +422,39 @@ "craft.idle": "En attente d'ingrédients", "craft.panel.empty": "Aucun atelier débloqué.", + "workstation.Foundry": "Fonderie", + "workstation.Workbench": "Établi", + "workstation.Furnace": "Fourneau", + "workstation.Loom": "Métier à tisser", + "workstation.Anvil": "Enclume", + "workstation.AlchemyTable": "Table d'alchimie", + "workstation.Forge": "Forge", + "workstation.SawingPost": "Poste de sciage", + "workstation.Windmill": "Moulin à vent", + "workstation.Watermill": "Moulin à eau", + "workstation.OilPress": "Pressoir à huile", + "workstation.PotteryWorkshop": "Atelier de poterie", + "workstation.TailorTable": "Table de couture", + "workstation.MortarAndPestle": "Mortier et pilon", + "workstation.DyeBasin": "Bassin de teinture", + "workstation.Jewelry": "Atelier de joaillerie", + "workstation.Smoker": "Fumoir", + "workstation.BrewingVat": "Cuve de brassage", + "workstation.EngineerDesk": "Bureau d'ingénieur", + "workstation.WeldingStation": "Poste de soudure", + "workstation.DrawingTable": "Table à dessin", + "workstation.EngravingBench": "Banc de gravure", + "workstation.SewingPost": "Poste de couture", + "workstation.MagicCauldron": "Chaudron magique", + "workstation.TransformationPentacle": "Pentacle de transformation", + "workstation.PaintingSpace": "Espace de peinture", + "workstation.Distillery": "Distillerie", + "workstation.Printer3D": "Imprimante 3D", + "workstation.MatterSynthesizer": "Synthétiseur de matière", + "workstation.GeneticModStation": "Station de modification génétique", + "workstation.TemporalBracelet": "Bracelet temporel", + "workstation.StasisChamber": "Chambre de stase", + "item.blueprint.foundry": "Plan de Fonderie", "item.blueprint.workbench": "Plan d'Établi", "item.blueprint.furnace": "Plan de Fourneau", diff --git a/src/OpenTheBox/Program.cs b/src/OpenTheBox/Program.cs index d3695a5..9b48577 100644 --- a/src/OpenTheBox/Program.cs +++ b/src/OpenTheBox/Program.cs @@ -593,7 +593,7 @@ public static class Program var recipeName = _registry.Recipes.TryGetValue(craftEvt.RecipeId, out var recDef) ? _loc.Get(recDef.NameKey) : craftEvt.RecipeId; - _renderer.ShowMessage(_loc.Get("craft.started", recipeName, craftEvt.Workstation.ToString())); + _renderer.ShowMessage(_loc.Get("craft.started", recipeName, _loc.Get($"workstation.{craftEvt.Workstation}"))); break; case CraftingCompletedEvent craftDoneEvt: diff --git a/src/OpenTheBox/Rendering/Panels/CraftingPanel.cs b/src/OpenTheBox/Rendering/Panels/CraftingPanel.cs index d2c0d73..1a2472c 100644 --- a/src/OpenTheBox/Rendering/Panels/CraftingPanel.cs +++ b/src/OpenTheBox/Rendering/Panels/CraftingPanel.cs @@ -29,7 +29,7 @@ public static class CraftingPanel // Show all unlocked workstations in stable order foreach (var station in state.UnlockedWorkstations.OrderBy(w => w.ToString())) { - string stationName = station.ToString(); + string stationName = loc?.Get($"workstation.{station}") ?? station.ToString(); if (jobsByStation.TryGetValue(station, out var job)) {