mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
refactor: remove single-owner helpers and redundant plumbing
Return feature-only helpers to their owners, remove inactive scaffolding and duplicate state, and reuse existing calculation and UI work without changing public contracts or gameplay. Record repository-wide coverage, justified retentions, independent reviews and validation, including baseline dashboard fixture failures. Assisted-by: Cindy (https://cindy.app)
This commit is contained in:
1 parent
325536fc79
commit
ba2648a3e3
60 files changed
+1094
-994
No files matched your search
@@ -133,21 +133,6 @@ public static class I18N
|
||||
ApplyIndexers();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the localized text for the given key in the currently active language,
|
||||
/// falling back to the key itself when no entry is registered.
|
||||
/// </summary>
|
||||
/// <param name="key">The lookup key.</param>
|
||||
/// <returns>The localized text, or <paramref name="key"/> if no entry exists.</returns>
|
||||
internal static string Translate(string key)
|
||||
{
|
||||
if (!Entries.TryGetValue(key, out var loc)) return key;
|
||||
var languageIndex = Localization.currentLanguageIndex;
|
||||
if (languageIndex >= 0 && languageIndex < Localization.Languages.Length && Localization.Languages[languageIndex].lcId == 2052)
|
||||
return loc.Zh;
|
||||
return loc.En;
|
||||
}
|
||||
|
||||
[HarmonyPostfix, HarmonyPriority(Priority.Last), HarmonyPatch(typeof(Localization), nameof(Localization.LoadSettings))]
|
||||
private static void Localization_LoadSettings_Postfix()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user