From 6c3415d86bb45bb1f21d1bd85b47d27b9752b534 Mon Sep 17 00:00:00 2001 From: SGKoishi Date: Fri, 28 Oct 2022 14:01:20 -0700 Subject: [PATCH] Minor i18n fix with interpolation The extractor handle the concatenate incorrectly --- TShockAPI/Commands.cs | 7 +++++-- TShockAPI/GetDataHandlers.cs | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index f7319d24..7bb63162 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -5341,7 +5341,10 @@ namespace TShockAPI if (ply != null && ply.Active) { if (displayIdsRequested) - players.Add(GetString($"{ply.Name} (Index: {ply.Index}{(ply.Account != null ? ", Account ID: " + ply.Account.ID : "")})")); + if (ply.Account != null) + players.Add(GetString($"{ply.Name} (Index: {ply.Index}, Account ID: {ply.Account.ID})")); + else + players.Add(GetString($"{ply.Name} (Index: {ply.Index})")); else players.Add(ply.Name); } @@ -5352,7 +5355,7 @@ namespace TShockAPI new PaginationTools.Settings { IncludeHeader = false, - FooterFormat = GetString($"Type {Specifier}who {(displayIdsRequested ? "-i" : string.Empty)}{Specifier} for more.") + FooterFormat = GetString($"Type {Specifier}who {(displayIdsRequested ? "-i" : string.Empty)} for more.") } ); } diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 485f46f8..b28bdf7d 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -3189,13 +3189,13 @@ namespace TShockAPI args.Player.IsDisabledForBannedWearable = false; - args.Player.SendMessage(GetString("Authenticated as " + args.Player.Name + " successfully."), Color.LimeGreen); - TShock.Log.ConsoleInfo(args.Player.Name + " authenticated successfully as user " + args.Player.Name + "."); + args.Player.SendMessage(GetString($"Authenticated as {args.Player.Name} successfully."), Color.LimeGreen); + TShock.Log.ConsoleInfo($"{args.Player.Name} authenticated successfully as user {args.Player.Name}."); TShock.UserAccounts.SetUserAccountUUID(account, args.Player.UUID); Hooks.PlayerHooks.OnPlayerPostLogin(args.Player); return true; } - args.Player.Kick("Your password did not match this character's password.", true, true); + args.Player.Kick(GetString("Your password did not match this character's password."), true, true); return true; }