Skip to content

fix: wire AceLocale into DragonLoot_Options tab files #109

@Xerrion

Description

@Xerrion

Summary

All 9 DragonLoot_Options tab files use bare English string literals for every widget label, tooltip, section header, and tab label. The DragonLoot/DragonLoot/Locales/enUS.lua locale file already contains correct entries for all of these strings (L["..."] = true) — they simply are never accessed because no tab file declares local L = ... or calls L["..."].

Root cause

DragonLoot_Options/Core.lua does not expose ns.L, and none of the tab files load or reference AceLocale.

Affected files (all 9 Options tabs + Core.lua)

  • DragonLoot_Options/Core.lua — missing ns.L = LibStub("AceLocale-3.0"):GetLocale("DragonLoot")
  • DragonLoot_Options/Tabs/GeneralTab.lua — 8 unlocalized strings
  • DragonLoot_Options/Tabs/LootWindowTab.lua — ~14 unlocalized strings
  • DragonLoot_Options/Tabs/LootRollTab.lua — ~40 unlocalized strings (largest file)
  • DragonLoot_Options/Tabs/HistoryTab.lua — ~14 unlocalized strings
  • DragonLoot_Options/Tabs/AppearanceTab.lua — ~30 unlocalized strings
  • DragonLoot_Options/Tabs/AnimationTab.lua — ~17 unlocalized strings
  • DragonLoot_Options/Tabs/AutoLootTab.lua — ~10 unlocalized strings (including long description blocks)
  • DragonLoot_Options/Tabs/NotificationsTab.lua — ~19 unlocalized strings
  • DragonLoot_Options/Tabs/ProfilesTab.lua — ~14 unlocalized strings (including StaticPopup dialog text)

Sample (GeneralTab.lua)

-- Current (unlocalized):
local enableToggle = W.CreateToggle(content, {
    label = "Enable DragonLoot",
    tooltip = "Enable or disable the DragonLoot addon",
    ...
})

-- Should be:
local L = ns.L  -- declared at top of file
local enableToggle = W.CreateToggle(content, {
    label = L["Enable DragonLoot"],
    tooltip = L["Enable or disable the DragonLoot addon"],
    ...
})

Fix

  1. Add ns.L = LibStub("AceLocale-3.0"):GetLocale("DragonLoot") to Core.lua
  2. In each tab file: add local L = ns.L after the local W/local LC block
  3. Wrap every bare string literal (label, tooltip, section header, tab label, button text, StaticPopup text) in L["..."]

The locale file is already complete — no new locale keys need to be added.

Additional: panel title in Core.lua

title = "DragonLoot Options" (line ~85 in Core.lua) should become title = L["DragonLoot Options"]. The key L["DragonLoot Options"] = true is already registered in enUS.lua.

Additional: QualityValues in Core.lua

The quality color-coded strings (lines 38-43) embed bare English names that should use L[...]:

-- Current:
{ value = "0", text = "|cff9d9d9dPoor|r" },
-- Should be:
{ value = "0", text = "|cff9d9d9d" .. L["Poor"] .. "|r" },

Keys L["Poor"], L["Common"], etc. are already in enUS.lua.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ConfigOptions table, config window, AceDBC-BugUnexpected or incorrect behaviorC-LocalizationTranslation and locale supportD-ComplexMultiple files or systems involved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions