Skip to content

Commit

Permalink
fix localization cache
Browse files Browse the repository at this point in the history
  • Loading branch information
blaxxun committed Dec 7, 2023
1 parent 83ddf1b commit 6e5a815
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ItemManager/ItemManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1803,7 +1803,11 @@ public class LocalizeKey
public readonly string Key;
public readonly Dictionary<string, string> Localizations = new();

public LocalizeKey(string key) => Key = key.Replace("$", "");
public LocalizeKey(string key)
{
Key = key.Replace("$", "");
keys.Add(this);
}

public void Alias(string alias)
{
Expand Down Expand Up @@ -1876,7 +1880,7 @@ internal static void AddLocalizedKeys(Localization __instance, string language)
}
else if (key.Localizations.TryGetValue("alias", out string alias))
{
Localization.instance.AddWord(key.Key, Localization.instance.Localize(alias));
__instance.AddWord(key.Key, Localization.instance.Localize(alias));
}
}
}
Expand Down

0 comments on commit 6e5a815

Please sign in to comment.