mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 05:00:02 +00:00
Build the class name lookup from FillLocalizedClassList
Replace the hardcoded per-locale ["class"] reverse-lookup tables (localized
class name -> token) with a runtime build in GetEnvironment:
L["class"] = tInvert(FillLocalizedClassList({}))
The client's own class list supplies the localized names for whatever locale is
running, so the tables were pure duplication -- and this also covers locales the
hardcoded tables never listed. Consumers (libunitscan, panel, socialmod) are
unchanged. Drop ["class"] from every locale file.
This commit is contained in:
@@ -292,6 +292,7 @@ function pfUI:GetEnvironment()
|
||||
pfUI.env.C = pfUI_config
|
||||
pfUI.env.pfUI_throttle = _G.pfUI_throttle
|
||||
pfUI.env.L = (pfUI_locale[GetLocale()] or pfUI_locale["enUS"])
|
||||
pfUI.env.L["class"] = pfUI.env.L["class"] or tInvert(LOCALIZED_CLASS_NAMES_MALE)
|
||||
|
||||
return pfUI.env
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user