ModernUO/Projects
Kamron Batman 79f736aa83
fix: keep the fallback localization table registered when emptied (#2724)
## Summary
`Localization.Remove` drops a language's dictionary from `_localizations` once its last entry is removed. For the fallback language (`enu`), `_fallbackEntries` still pointed at the dropped dictionary. A later `Add("enu", ...)` then created a new dictionary, and because `_fallbackEntries` was not null, `Add`'s `??=` left it on the old one. Every fallback lookup missed the new entries.

The fallback table now stays registered when it empties. Later adds land in the dictionary lookups read, and removed entries stay removed. Nulling `_fallbackEntries` instead would have made the next lookup reload `cliloc.enu` from disk and bring back the removed entries.

Nothing in production calls `Remove` today. It is public API for shards and tests; #2722 adds a test cleanup that removes entries.

## Tests
- `LocalizationEntryTests.RemovingTheLastFallbackEntry_KeepsLaterAddsVisible` clears the tables, adds then removes one `enu` entry, adds another, and checks that the fallback lookup finds the new entry and not the removed one. It clears again afterwards so later tests reload the real tables. It fails without the fix.
- Server.Tests: all pass.
2026-10-18 20:10:39 -07:00
..
Application fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
BuildTool feat: Bumps dependencies. Introduces Serialization Generator v3 (#2584) 2026-08-22 15:48:53 -07:00
Logger fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
Server fix: keep the fallback localization table registered when emptied (#2724) 2026-10-18 20:10:39 -07:00
Server.Tests fix: keep the fallback localization table registered when emptied (#2724) 2026-10-18 20:10:39 -07:00
UOContent fix: reject archive entries that extract outside the output directory (#2720) 2026-10-18 20:06:23 -07:00
UOContent.Tests test: remove trivial, duplicate and content-value tests (#2721) 2026-10-18 20:08:19 -07:00