Added translation support for server orders.

This commit is contained in:
Matthias Mailänder
2021-12-18 20:12:28 +01:00
committed by teinarss
parent ee95d2591f
commit 0260884369
19 changed files with 834 additions and 149 deletions

View File

@@ -107,7 +107,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
widget.Get<LabelWidget>("CONNECTING_DESC").GetText = () => $"Could not connect to {connection.Target}";
var connectionError = widget.Get<LabelWidget>("CONNECTION_ERROR");
connectionError.GetText = () => orderManager.ServerError ?? connection.ErrorMessage ?? "Unknown error";
connectionError.GetText = () => Ui.Translate(orderManager.ServerError) ?? connection.ErrorMessage ?? "Unknown error";
var panelTitle = widget.Get<LabelWidget>("TITLE");
panelTitle.GetText = () => orderManager.AuthenticationFailed ? "Password Required" : "Connection Failed";