From 1628ce64db0283a0fd158ac516297310e67d72cd Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Mon, 11 Jul 2022 13:21:14 +0200 Subject: [PATCH] Fix lobby error messages from the server being untranslated --- OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs index cfcb8777fc..b29fe1432c 100644 --- a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs @@ -286,26 +286,25 @@ namespace OpenRA.Mods.Common.Server { if (!client.IsAdmin) { - server.SendOrderTo(conn, "Message", OnlyHostStartGame); + server.SendLocalizedMessageTo(conn, OnlyHostStartGame); return true; } - if (server.LobbyInfo.Slots.Any(sl => sl.Value.Required && - server.LobbyInfo.ClientInSlot(sl.Key) == null)) + if (server.LobbyInfo.Slots.Any(sl => sl.Value.Required && server.LobbyInfo.ClientInSlot(sl.Key) == null)) { - server.SendOrderTo(conn, "Message", NoStartUntilRequiredSlotsFull); + server.SendLocalizedMessageTo(conn, NoStartUntilRequiredSlotsFull); return true; } if (!server.LobbyInfo.GlobalSettings.EnableSingleplayer && server.LobbyInfo.NonBotPlayers.Count() < 2) { - server.SendOrderTo(conn, "Message", TwoHumansRequired); + server.SendLocalizedMessageTo(conn, TwoHumansRequired); return true; } if (LobbyUtils.InsufficientEnabledSpawnPoints(server.Map, server.LobbyInfo)) { - server.SendOrderTo(conn, "Message", InsufficientEnabledSpawnPoints); + server.SendLocalizedMessageTo(conn, InsufficientEnabledSpawnPoints); return true; }