diff --git a/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs index c45d0af594..300f3a9e0f 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs @@ -45,6 +45,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic [TranslationReference] const string CantPlayCancel = "dialog-cant-play-video.cancel"; + [TranslationReference] + const string NotAvailable = "label-not-available"; + readonly ModData modData; readonly Action onStart; readonly Widget missionDetail; @@ -379,7 +382,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic var dropdown = dropdownColumns.Dequeue(); - dropdown.GetText = () => option.Values[missionOptions[option.Id]]; + dropdown.GetText = () => + { + if (option.Values.TryGetValue(missionOptions[option.Id], out var value)) + return value; + + return TranslationProvider.GetString(NotAvailable); + }; + if (option.Description != null) { var (text, desc) = LobbyUtils.SplitOnFirstToken(option.Description); diff --git a/mods/common/languages/en.ftl b/mods/common/languages/en.ftl index 37ebb34816..98c99c2c2b 100644 --- a/mods/common/languages/en.ftl +++ b/mods/common/languages/en.ftl @@ -349,7 +349,7 @@ options-slot-admin = button-general-chat = All button-team-chat = Team -## LobbyOptionsLogic +## LobbyOptionsLogic, MissionBrowserLogic label-not-available = Not Available ## LobbyUtils