From 76d9d9fa21954dfff5036ab2ccb69c77f05210a8 Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Tue, 23 Jun 2026 21:44:35 +0800 Subject: [PATCH] refactor: use localization constants for last remaining literals --- CheatEnabler/Functions/DysonSphere/IllegalShellFunctions.cs | 2 +- CheatEnabler/Functions/PlayerFunctions.cs | 2 +- UXAssist/Patches/PlayerPatch.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CheatEnabler/Functions/DysonSphere/IllegalShellFunctions.cs b/CheatEnabler/Functions/DysonSphere/IllegalShellFunctions.cs index 7cb441d..68effac 100644 --- a/CheatEnabler/Functions/DysonSphere/IllegalShellFunctions.cs +++ b/CheatEnabler/Functions/DysonSphere/IllegalShellFunctions.cs @@ -88,7 +88,7 @@ public static class IllegalShellFunctions } if (nodePos.Count == 0) { - UIMessageBox.Show(Localization.CheatEnabler.Translate(), string.Format("There is no Dyson Sphere shell on \"{0}\".".Translate(), star.displayName), Localization.OK.Translate(), UIMessageBox.ERROR, null); + UIMessageBox.Show(Localization.CheatEnabler.Translate(), string.Format(Localization.ThereIsNoDysonSphereShellOn0.Translate(), star.displayName), Localization.OK.Translate(), UIMessageBox.ERROR, null); return; } var currentShellCount = layer.shellCount; diff --git a/CheatEnabler/Functions/PlayerFunctions.cs b/CheatEnabler/Functions/PlayerFunctions.cs index f16bafe..2be3e32 100644 --- a/CheatEnabler/Functions/PlayerFunctions.cs +++ b/CheatEnabler/Functions/PlayerFunctions.cs @@ -137,7 +137,7 @@ public static class PlayerFunctions if (itemCnt.All(cnt => cnt == 0)) { - UIMessageBox.Show("Remove metadata consumption record in current game".Translate(), "NoMetadataConsumptionRecord".Translate(), "OK".Translate(), UIMessageBox.INFO); + UIMessageBox.Show(Localization.RemoveMetadataConsumptionRecordInCurrentGame.Translate(), Localization.NoMetadataConsumptionRecord.Translate(), Localization.OK.Translate(), UIMessageBox.INFO); return; } var msg = Localization.ClearCurrentMetadataConsumptionDetails.Translate(); diff --git a/UXAssist/Patches/PlayerPatch.cs b/UXAssist/Patches/PlayerPatch.cs index 04bbb6f..f3b8940 100644 --- a/UXAssist/Patches/PlayerPatch.cs +++ b/UXAssist/Patches/PlayerPatch.cs @@ -347,7 +347,7 @@ public class PlayerPatch : PatchImpl AutoCruiseEnabled.Value = !AutoCruiseEnabled.Value; if (!DSPGame.IsMenuDemo && GameMain.isRunning) { - UIRoot.instance.uiGame.generalTips.InvokeRealtimeTipAhead((AutoCruiseEnabled.Value ? "AutoCruiseOn" : "AutoCruiseOff").Translate()); + UIRoot.instance.uiGame.generalTips.InvokeRealtimeTipAhead((AutoCruiseEnabled.Value ? I18NKeys.AutoCruiseOn : I18NKeys.AutoCruiseOff).Translate()); } }