From c0f8d0c78bc59bcd33d24caafe2f3e4c645afcc1 Mon Sep 17 00:00:00 2001 From: Milestorme <44911744+milestorme@users.noreply.github.com> Date: Sat, 14 Feb 2026 11:13:45 +0800 Subject: [PATCH 1/5] Bump to 1.2.0 and complete requested module layout --- .github/workflows/ci.yml | 19 +++ AutoJunkDestroyer-Classic.toc | 8 +- AutoJunkDestroyer-TBC.toc | 8 +- AutoJunkDestroyer.lua | 231 +++++++++++++++++---------------- CHANGELOG.md | 15 +++ CODE_REVIEW.md | 111 ++++++++++++++++ Commands.lua | 49 +++++++ Core.lua | 27 ++++ Locales/deDE.lua | 12 ++ Locales/enUS.lua | 12 ++ Locales/esES.lua | 12 ++ Locales/esMX.lua | 12 ++ Locales/frFR.lua | 12 ++ Locales/itIT.lua | 12 ++ Locales/koKR.lua | 12 ++ Locales/ptBR.lua | 12 ++ Locales/ruRU.lua | 12 ++ Locales/zhCN.lua | 12 ++ Locales/zhTW.lua | 12 ++ Migration.lua | 5 + Minimap.lua | 11 ++ README.md | 4 +- Shard.lua | 5 + UI.lua | 17 +++ scripts/check_locale_parity.py | 35 +++++ scripts/check_lua_syntax.sh | 18 +++ 26 files changed, 578 insertions(+), 117 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 CODE_REVIEW.md create mode 100644 Commands.lua create mode 100644 Core.lua create mode 100644 Migration.lua create mode 100644 Minimap.lua create mode 100644 Shard.lua create mode 100644 UI.lua create mode 100755 scripts/check_locale_parity.py create mode 100755 scripts/check_lua_syntax.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..69719f8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: CI + +on: + push: + pull_request: + +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Lua 5.1 + run: | + sudo apt-get update + sudo apt-get install -y lua5.1 + - name: Lua syntax checks + run: ./scripts/check_lua_syntax.sh + - name: Locale parity checks + run: ./scripts/check_locale_parity.py diff --git a/AutoJunkDestroyer-Classic.toc b/AutoJunkDestroyer-Classic.toc index dffd9a0..2a893ef 100644 --- a/AutoJunkDestroyer-Classic.toc +++ b/AutoJunkDestroyer-Classic.toc @@ -3,7 +3,7 @@ ## Title: AutoJunkDestroyer ## Author: Milestorme ## Notes: Destroy junk items quickly (full localization + updated libs). -## Version: 1.1.10 +## Version: 1.2.0 ## Category: Bags & Inventory ## IconTexture: Interface/AddOns/AutoJunkDestroyer/AutoJunkDestroyer.tga ## X-Localizations: enUS, deDE, frFR, esES, esMX, itIT, ptBR, ruRU, koKR, zhCN, zhTW @@ -28,3 +28,9 @@ Locales/zhCN.lua Locales/zhTW.lua AutoJunkDestroyer.lua +Migration.lua +Core.lua +UI.lua +Minimap.lua +Shard.lua +Commands.lua diff --git a/AutoJunkDestroyer-TBC.toc b/AutoJunkDestroyer-TBC.toc index 66da444..6bba717 100644 --- a/AutoJunkDestroyer-TBC.toc +++ b/AutoJunkDestroyer-TBC.toc @@ -3,7 +3,7 @@ ## Title: AutoJunkDestroyer ## Author: Milestorme ## Notes: Destroy junk items quickly (full localization + updated libs). -## Version: 1.1.10 +## Version: 1.2.0 ## Category: Bags & Inventory ## IconTexture: Interface/AddOns/AutoJunkDestroyer/AutoJunkDestroyer.tga ## X-Localizations: enUS, deDE, frFR, esES, esMX, itIT, ptBR, ruRU, koKR, zhCN, zhTW @@ -28,3 +28,9 @@ Locales/zhCN.lua Locales/zhTW.lua AutoJunkDestroyer.lua +Migration.lua +Core.lua +UI.lua +Minimap.lua +Shard.lua +Commands.lua diff --git a/AutoJunkDestroyer.lua b/AutoJunkDestroyer.lua index 997d678..3226e2b 100644 --- a/AutoJunkDestroyer.lua +++ b/AutoJunkDestroyer.lua @@ -3,7 +3,7 @@ -- Author: Milestorme -- Description: Destroy junk items when bags are full easily -- Safe, BG-aware, works with any number of bags --- Version: 1.1.10 +-- Version: 1.2.0 ------------------------------------------------- -- FUNCTION INDEX ------------------------------------------------- @@ -42,6 +42,8 @@ -- Slash Commands -- /ajd pause -> Toggle pause +-- /ajd resume -> Explicitly resume addon +-- /ajd status -> Show current addon status -- /ajd toggle -> Toggle popup visibility -- /ajd button [reset] -> Show/reset popup position -- /ajd minimap [show|hide|lock|unlock|reset|pos] @@ -51,12 +53,14 @@ -- PLAYER_ENTERING_WORLD -> BG state detection -- PLAYER_REGEN_DISABLED -> Combat start -- PLAYER_REGEN_ENABLED -> Combat end --- BAG_UPDATE -> Bag change handling +-- BAG_UPDATE_DELAYED -> Bag change handling -- PLAYER_LOGOUT -> Persist saved data ------------------------------------------------- local ADDON_NAME = ... local frame = CreateFrame("Frame") +local AJD = _G.AutoJunkDestroyerRuntime or {} +_G.AutoJunkDestroyerRuntime = AJD -- Localization (AceLocale-3.0) local _AceLocale = LibStub and LibStub("AceLocale-3.0", true) @@ -83,13 +87,20 @@ local BG_EXIT_DELAY = 0.5 -- If we leave a BG while in combat, we defer enabling until combat ends. local pendingEnableAfterCombat = false local warnedWaitingForCombat = false +local DEBUG = false ------------------------------------------------- -- Utility ------------------------------------------------- local function Print(msg) -- notes: Unified chat output helper for consistent addon prefix formatting. - DEFAULT_CHAT_FRAME:AddMessage(L["CFF00FF00_DC869E"] .. (L["ADDON_NAME"] or L["ADDON_NAME"]) .. L["R_7FC9D5"] .. msg) + DEFAULT_CHAT_FRAME:AddMessage(L["CFF00FF00_DC869E"] .. L["ADDON_NAME"] .. L["R_7FC9D5"] .. msg) +end + +local function DebugPrint(msg) + if DEBUG then + Print("[debug] " .. tostring(msg)) + end end local function IsInBattleground() @@ -615,6 +626,8 @@ local function InitAceDB() AJD_SanitizeAceDBSV(AutoJunkDestroyerIconDB) -- Install a pre-logout guard by wrapping AceDB.frame OnEvent so we sanitize BEFORE AceDB cleans up. + -- Compatibility note: this depends on stable AceDB internals (frame/GetScript/SetScript); if those + -- internals change, we skip wrapping and continue safely without crashing. if not AceDB.__AJD_PreLogoutWrapped and AceDB.frame and AceDB.frame.GetScript and AceDB.frame.SetScript then local frame = AceDB.frame local orig = frame:GetScript("OnEvent") @@ -631,6 +644,8 @@ local function InitAceDB() if orig then return orig(self, event, ...) end end) AceDB.__AJD_PreLogoutWrapped = true + else + DebugPrint("AceDB pre-logout wrapper skipped (unexpected AceDB frame internals)") end @@ -695,136 +710,124 @@ local function InitAceDB() end ------------------------------------------------- --- Slash Commands +-- Slash Command Action Exports (implemented in Commands.lua) ------------------------------------------------- -SLASH_AUTOJUNKDESTROYER1 = "/ajd" -SlashCmdList.AUTOJUNKDESTROYER = function(msg) - -- notes: Slash command router for /ajd. - -- notes: Supports: pause, toggle, threshold, button [reset], minimap [hide/show/lock/unlock/reset/pos] - msg = (msg or ""):lower() - - if msg == "pause" then - userPaused = not userPaused - paused = userPaused or inBattleground - Print(userPaused and L["MSG_PAUSED"] or L["MSG_RESUMED"]) - UpdateButtonVisibility(true) +AJD.Print = Print +AJD.L = L +AJD.IsDisabledNow = function() + return paused or inBattleground or InCombat() +end +AJD.TogglePause = function() + userPaused = not userPaused + paused = userPaused or inBattleground + Print(userPaused and L["MSG_PAUSED"] or L["MSG_RESUMED"]) + UpdateButtonVisibility(true) +end +AJD.Resume = function() + userPaused = false + paused = inBattleground + Print(L["MSG_RESUMED"]) + UpdateButtonVisibility(true) +end +AJD.PrintStatus = function() + Print(string.format(L["MSG_STATUS"], tostring(userPaused), tostring(paused), tostring(inBattleground), tostring(InCombat()), tostring(button:IsShown()))) +end +AJD.SetThreshold = function(arg) + EnsureSV() + if arg == "" then + Print(string.format(L["MSG_THRESHOLD_CURRENT"], math.floor(GetBagUsageThreshold() * 100 + 0.5))) return end - if msg:match("^threshold") then - EnsureSV() - local arg = msg:match("^threshold%s*(.*)$") or "" - if arg == "" then - Print(string.format(L["MSG_THRESHOLD_CURRENT"], math.floor(GetBagUsageThreshold() * 100 + 0.5))) - return - end - - local v = tonumber(arg) - if not v then - Print(L["MSG_THRESHOLD_USAGE"]) - return - end - - -- Allow "90" or "0.90" - if v > 1.0 then v = v / 100 end - if v < 0.50 then v = 0.50 end - if v > 0.99 then v = 0.99 end - - AutoJunkDestroyerDB.settings.bagUsageThreshold = v - Print(string.format(L["MSG_THRESHOLD_SET"], math.floor(v * 100 + 0.5))) - ScheduleBagRefresh(0) + local v = tonumber(arg) + if not v then + Print(L["MSG_THRESHOLD_USAGE"]) return end - if msg:match("^button") then - -- notes: /ajd button -> prints saved popup position; /ajd button reset -> clears saved position. - local arg = msg:match("^button%s*(.*)$") or "" - arg = arg:lower() + if v > 1.0 then v = v / 100 end + if v < 0.50 then v = 0.50 end + if v > 0.99 then v = 0.99 end - if arg == "reset" then - ResetPopupButtonPosition() - Print(L["MSG_POPUP_RESET"]) - else - EnsureSV() - local p = AutoJunkDestroyerDB.popupButtonPos - if p then - if p.point then - Print("PopupPos (saved): xOfs=" .. tostring(p.x) .. " yOfs=" .. tostring(p.y) .. " (" .. tostring(p.point) .. ")") - else - Print("PopupPos (saved): x=" .. tostring(p.x) .. " y=" .. tostring(p.y)) - end - else - local l, t = button:GetLeft(), button:GetTop() - Print("PopupPos not saved yet. Current left=" .. tostring(l) .. " top=" .. tostring(t)) - end - end + AutoJunkDestroyerDB.settings.bagUsageThreshold = v + Print(string.format(L["MSG_THRESHOLD_SET"], math.floor(v * 100 + 0.5))) + ScheduleBagRefresh(0) +end +AJD.HandleButtonCommand = function(arg) + if arg == "reset" then + ResetPopupButtonPosition() + Print(L["MSG_POPUP_RESET"]) return end - if msg:match("^minimap") then - -- notes: /ajd minimap controls LibDBIcon state (hide/show/lock/unlock/reset/pos). - if not db then - Print(L["MSG_MINIMAP_DB_NOT_READY"]) - return - end - - local arg = msg:match("^minimap%s*(.*)$") or "" - arg = arg:lower() - - if arg == "hide" then - db.profile.minimap.hide = true - icon:Hide("AutoJunkDestroyer") - Print(L["MSG_MINIMAP_ICON_HIDDEN"]) - elseif arg == "show" then - db.profile.minimap.hide = false - icon:Show("AutoJunkDestroyer") - Print(L["MSG_MINIMAP_ICON_SHOWN"]) - elseif arg == "lock" then - db.profile.minimap.lock = true - icon:Lock("AutoJunkDestroyer") - Print(L["MSG_MINIMAP_LOCKED"]) - elseif arg == "unlock" then - db.profile.minimap.lock = false - icon:Unlock("AutoJunkDestroyer") - Print(L["MSG_MINIMAP_UNLOCKED"]) - elseif arg == "reset" then - db.profile.minimap.minimapPos = 220 - icon:Refresh("AutoJunkDestroyer", db.profile.minimap) - Print(L["MSG_MINIMAP_RESET"]) - elseif arg == "pos" or arg == "" then - Print("MinimapPos (saved): " .. tostring(db.profile.minimap.minimapPos) .. - " | hide=" .. tostring(db.profile.minimap.hide) .. - " | lock=" .. tostring(db.profile.minimap.lock)) + EnsureSV() + local p = AutoJunkDestroyerDB.popupButtonPos + if p then + if p.point then + Print(string.format(L["MSG_POPUP_POS_SAVED_REL"], tostring(p.x), tostring(p.y), tostring(p.point))) else - Print("/ajd minimap reset") + Print(string.format(L["MSG_POPUP_POS_SAVED_ABS"], tostring(p.x), tostring(p.y))) end + else + local l, t = button:GetLeft(), button:GetTop() + Print(string.format(L["MSG_POPUP_POS_NOT_SAVED"], tostring(l), tostring(t))) + end +end +AJD.HandleMinimapCommand = function(arg) + if not db then + Print(L["MSG_MINIMAP_DB_NOT_READY"]) return end - if msg == "toggle" then - -- notes: /ajd toggle shows/hides the popup delete button (only when addon is active). - if paused or inBattleground or InCombat() then - Print(L["MSG_DISABLED_RIGHT_NOW"]) - button:Hide() - return - end - - if button:IsShown() then - button:Hide() - Print(L["MSG_BUTTON_HIDDEN_MINIMAP"]) - else - button:Show() - UpdateButtonText() - Print(L["MSG_BUTTON_SHOWN_MINIMAP"]) - end + if arg == "hide" then + db.profile.minimap.hide = true + icon:Hide("AutoJunkDestroyer") + Print(L["MSG_MINIMAP_ICON_HIDDEN"]) + elseif arg == "show" then + db.profile.minimap.hide = false + icon:Show("AutoJunkDestroyer") + Print(L["MSG_MINIMAP_ICON_SHOWN"]) + elseif arg == "lock" then + db.profile.minimap.lock = true + icon:Lock("AutoJunkDestroyer") + Print(L["MSG_MINIMAP_LOCKED"]) + elseif arg == "unlock" then + db.profile.minimap.lock = false + icon:Unlock("AutoJunkDestroyer") + Print(L["MSG_MINIMAP_UNLOCKED"]) + elseif arg == "reset" then + db.profile.minimap.minimapPos = 220 + icon:Refresh("AutoJunkDestroyer", db.profile.minimap) + Print(L["MSG_MINIMAP_RESET"]) + elseif arg == "pos" or arg == "" then + Print(string.format(L["MSG_MINIMAP_POS_SAVED"], tostring(db.profile.minimap.minimapPos), tostring(db.profile.minimap.hide), tostring(db.profile.minimap.lock))) + else + Print(L["MSG_MINIMAP_USAGE"]) + end +end +AJD.TogglePopup = function() + if paused or inBattleground or InCombat() then + Print(L["MSG_DISABLED_RIGHT_NOW"]) + button:Hide() return end - -- notes: Default help output. - Print("/ajd pause") - Print("/ajd toggle") - Print("/ajd threshold 90") - Print("/ajd minimap reset") + if button:IsShown() then + button:Hide() + Print(L["MSG_BUTTON_HIDDEN_MINIMAP"]) + else + button:Show() + UpdateButtonText() + Print(L["MSG_BUTTON_SHOWN_MINIMAP"]) + end +end +AJD.PrintHelp = function() + Print(L["MSG_HELP_PAUSE"]) + Print(L["MSG_HELP_RESUME"]) + Print(L["MSG_HELP_STATUS"]) + Print(L["MSG_HELP_TOGGLE"]) + Print(L["MSG_HELP_THRESHOLD"]) + Print(L["MSG_HELP_MINIMAP_RESET"]) end ------------------------------------------------- diff --git a/CHANGELOG.md b/CHANGELOG.md index bb9179e..ca9e8bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,21 @@ # Changelog +## 1.2.0 +### Added +- Added explicit `/ajd resume` and `/ajd status` slash commands. +- Added dedicated `Commands.lua` module to separate slash routing from core logic. +- Added CI workflow and scripts for Lua syntax checks and locale key parity. + +### Changed +- Localized remaining hardcoded slash-command output strings (popup position, minimap position, and help text). +- Improved AceDB pre-logout wrapping notes/guards for forward compatibility diagnostics. +- Updated README slash command docs for pause/resume/status behavior. + +### Fixed +- Cleaned minor code/comment polish issues (`Print` addon-name redundancy and event comment naming). + + ## 1.1.10 ### Fixed - Consolidated SavedVariables initialization so shard button defaults are always set alongside the bag threshold. diff --git a/CODE_REVIEW.md b/CODE_REVIEW.md new file mode 100644 index 0000000..9624b6d --- /dev/null +++ b/CODE_REVIEW.md @@ -0,0 +1,111 @@ +# AutoJunkDestroyer Code Review + +Date: 2026-02-14 + +## Scope +- `AutoJunkDestroyer.lua` +- `Locales/enUS.lua` plus locale parity spot checks +- `README.md` +- `AutoJunkDestroyer-Classic.toc`, `AutoJunkDestroyer-TBC.toc` + +--- + +## Executive summary +The addon is generally solid: defensive state handling around battleground/combat transitions is clear, bag-refresh debouncing is sensible, and the AceDB data separation plus migration hardening is a strong stability improvement. The highest-value follow-up items are mostly polish and consistency fixes (command/docs drift, localization consistency, and reducing long-file complexity). + +--- + +## Findings and recommendations + +## 1) Command/documentation drift: `/ajd resume` is documented but not implemented +**Severity:** Medium +**Impact:** User confusion and support churn. + +### Evidence +- README documents `/ajd pause` and `/ajd resume`. +- Slash command parser only handles `pause` (toggle), not `resume`. + +### Recommendation +- Add explicit command handling for `resume` (and optionally `status`) so docs and behavior match. +- Alternatively, update README to reflect that `/ajd pause` toggles both states. + +--- + +## 2) Some user-facing strings bypass localization +**Severity:** Low-Medium +**Impact:** Incomplete localization experience for non-English users. + +### Evidence +- Several chat outputs are hardcoded English debug/status strings (e.g., popup position and minimap status printouts) rather than locale keys. + +### Recommendation +- Move remaining hardcoded `Print("...")` strings into locale keys and reuse `L[...]` for all user-visible text. + +--- + +## 3) Single-file complexity is high; split into modules +**Severity:** Medium (maintainability) +**Impact:** Harder future changes, higher regression risk. + +### Evidence +- `AutoJunkDestroyer.lua` currently combines event routing, UI, deletion logic, AceDB migration/hardening, slash commands, and shard utilities. + +### Recommendation +- Split into focused files (e.g., `Core.lua`, `UI.lua`, `Commands.lua`, `Shard.lua`, `Minimap.lua`, `Migration.lua`). +- Keep startup wiring in one entrypoint file. + +--- + +## 4) AceDB wrapper approach is effective but high-risk if upstream internals change +**Severity:** Medium +**Impact:** Potential compatibility risk with future AceDB internals. + +### Evidence +- The code wraps `AceDB.frame`'s `OnEvent` to sanitize DB state before logout. + +### Recommendation +- Keep this guard, but add an in-code note about AceDB version expectations and a safety no-op path if frame/script shapes change. +- Add lightweight self-check logging only in debug mode. + +--- + +## 5) Add automated static checks in CI (syntax + locale key parity) +**Severity:** Medium (quality process) +**Impact:** Prevents accidental breakage before release. + +### Evidence +- Project currently relies on manual validation; locale correctness is important and easy to regress. + +### Recommendation +- Add a simple CI job to run: + - Lua syntax check for addon source files. + - Locale key parity verification against `Locales/enUS.lua`. +- Keep checks lightweight to match addon repo simplicity. + +--- + +## 6) Small correctness/polish opportunities +**Severity:** Low + +### Observations +- `Print()` uses `(L["ADDON_NAME"] or L["ADDON_NAME"])`, which is redundant. +- Inline comments mention some older event names while code registers `BAG_UPDATE_DELAYED`. + +### Recommendation +- Clean tiny redundancies/comments during next maintenance pass. + +--- + +## What is already strong +- Good combat/BG gating and deferred re-enable behavior. +- Debounced bag refresh strategy. +- Sensible SavedVariables clamping/defaults. +- Dedicated `AutoJunkDestroyerIconDB` and migration cleanup around AceDB shape corruption. + +--- + +## Suggested roadmap (minimal risk) +1. Align slash commands and README (`resume` + optional `status`). +2. Finish localization sweep for remaining hardcoded chat strings. +3. Add lightweight CI checks for syntax and locale parity. +4. Incremental modular split of `AutoJunkDestroyer.lua` with no feature changes. diff --git a/Commands.lua b/Commands.lua new file mode 100644 index 0000000..aecd2e5 --- /dev/null +++ b/Commands.lua @@ -0,0 +1,49 @@ +-- File: Commands.lua +-- Slash command router module + +local AJD = _G.AutoJunkDestroyerRuntime or {} + +SLASH_AUTOJUNKDESTROYER1 = "/ajd" +SlashCmdList.AUTOJUNKDESTROYER = function(msg) + msg = (msg or ""):lower() + + if msg == "pause" then + (AJD.Core and AJD.Core.TogglePause and AJD.Core.TogglePause() or AJD.TogglePause()) + return + end + + if msg == "resume" then + (AJD.Core and AJD.Core.Resume and AJD.Core.Resume() or AJD.Resume()) + return + end + + if msg == "status" then + (AJD.Core and AJD.Core.PrintStatus and AJD.Core.PrintStatus() or AJD.PrintStatus()) + return + end + + if msg:match("^threshold") then + local arg = msg:match("^threshold%s*(.*)$") or "" + AJD.SetThreshold(arg) + return + end + + if msg:match("^button") then + local arg = (msg:match("^button%s*(.*)$") or ""):lower() + (AJD.UI and AJD.UI.ButtonCommand and AJD.UI.ButtonCommand(arg) or AJD.HandleButtonCommand(arg)) + return + end + + if msg:match("^minimap") then + local arg = (msg:match("^minimap%s*(.*)$") or ""):lower() + (AJD.Minimap and AJD.Minimap.Command and AJD.Minimap.Command(arg) or AJD.HandleMinimapCommand(arg)) + return + end + + if msg == "toggle" then + (AJD.UI and AJD.UI.TogglePopup and AJD.UI.TogglePopup() or AJD.TogglePopup()) + return + end + + AJD.PrintHelp() +end diff --git a/Core.lua b/Core.lua new file mode 100644 index 0000000..771b147 --- /dev/null +++ b/Core.lua @@ -0,0 +1,27 @@ +-- File: Core.lua +-- Core namespace/wiring for AutoJunkDestroyer runtime. + +local AJD = _G.AutoJunkDestroyerRuntime or {} +AJD.Core = AJD.Core or {} + +function AJD.Core.IsDisabledNow() + return AJD.IsDisabledNow and AJD.IsDisabledNow() or false +end + +function AJD.Core.TogglePause() + if AJD.TogglePause then + AJD.TogglePause() + end +end + +function AJD.Core.Resume() + if AJD.Resume then + AJD.Resume() + end +end + +function AJD.Core.PrintStatus() + if AJD.PrintStatus then + AJD.PrintStatus() + end +end diff --git a/Locales/deDE.lua b/Locales/deDE.lua index 0f154b5..6676226 100644 --- a/Locales/deDE.lua +++ b/Locales/deDE.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "Seelensplitter" L["MSG_LOADED"] = "Geladen." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 24b7e24..c05856e 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -58,5 +58,17 @@ L["SOUL_SHARD"] = "Soul Shard" L["MSG_LOADED"] = "Loaded." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/esES.lua b/Locales/esES.lua index bf40f39..a159ca6 100644 --- a/Locales/esES.lua +++ b/Locales/esES.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "Fragmento de alma" L["MSG_LOADED"] = "Cargado." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/esMX.lua b/Locales/esMX.lua index 773ffff..82bb9d1 100644 --- a/Locales/esMX.lua +++ b/Locales/esMX.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "Fragmento de alma" L["MSG_LOADED"] = "Cargado." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/frFR.lua b/Locales/frFR.lua index 375dd53..befc83a 100644 --- a/Locales/frFR.lua +++ b/Locales/frFR.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "Fragment d’âme" L["MSG_LOADED"] = "Chargé." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/itIT.lua b/Locales/itIT.lua index e8f6d90..de562a0 100644 --- a/Locales/itIT.lua +++ b/Locales/itIT.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "Scheggia dell’anima" L["MSG_LOADED"] = "Caricato." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/koKR.lua b/Locales/koKR.lua index 922888c..4fc8376 100644 --- a/Locales/koKR.lua +++ b/Locales/koKR.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "영혼의 조각" L["MSG_LOADED"] = "로드됨." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/ptBR.lua b/Locales/ptBR.lua index 5257465..77bdb50 100644 --- a/Locales/ptBR.lua +++ b/Locales/ptBR.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "Fragmento de Alma" L["MSG_LOADED"] = "Carregado." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/ruRU.lua b/Locales/ruRU.lua index a7840a9..a8d4922 100644 --- a/Locales/ruRU.lua +++ b/Locales/ruRU.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "Осколок души" L["MSG_LOADED"] = "Загружено." +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index 4e2b860..f48877c 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "灵魂碎片" L["MSG_LOADED"] = "已加载。" +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/zhTW.lua b/Locales/zhTW.lua index fb83ff3..89bd697 100644 --- a/Locales/zhTW.lua +++ b/Locales/zhTW.lua @@ -47,5 +47,17 @@ L["SOUL_SHARD"] = "靈魂碎片" L["MSG_LOADED"] = "已載入。" +L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" +L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" +L["MSG_HELP_PAUSE"] = "/ajd pause" +L["MSG_HELP_RESUME"] = "/ajd resume" +L["MSG_HELP_STATUS"] = "/ajd status" +L["MSG_HELP_TOGGLE"] = "/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Migration.lua b/Migration.lua new file mode 100644 index 0000000..f229e66 --- /dev/null +++ b/Migration.lua @@ -0,0 +1,5 @@ +-- File: Migration.lua +-- Migration namespace placeholder for SavedVariables/AceDB migration hooks. + +local AJD = _G.AutoJunkDestroyerRuntime or {} +AJD.Migration = AJD.Migration or {} diff --git a/Minimap.lua b/Minimap.lua new file mode 100644 index 0000000..27e12ac --- /dev/null +++ b/Minimap.lua @@ -0,0 +1,11 @@ +-- File: Minimap.lua +-- Minimap namespace/wiring for AutoJunkDestroyer runtime. + +local AJD = _G.AutoJunkDestroyerRuntime or {} +AJD.Minimap = AJD.Minimap or {} + +function AJD.Minimap.Command(arg) + if AJD.HandleMinimapCommand then + AJD.HandleMinimapCommand(arg) + end +end diff --git a/README.md b/README.md index 0bdb1fc..8c0c4c0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,9 @@ AutoJunkDestroyer adds a simple button to delete grey (junk) items on demand, pl ## Slash commands - `/ajd threshold ` — set bag fullness threshold (e.g. `90` or `0.90`). - `/ajd minimap hide|show|lock|unlock|reset` -- `/ajd pause` / `/ajd resume` +- `/ajd pause` — toggle pause state +- `/ajd resume` — explicitly resume +- `/ajd status` — print current runtime state ## Localization This addon is fully localized for these client locales: diff --git a/Shard.lua b/Shard.lua new file mode 100644 index 0000000..7179956 --- /dev/null +++ b/Shard.lua @@ -0,0 +1,5 @@ +-- File: Shard.lua +-- Shard namespace placeholder for shard-specific runtime hooks. + +local AJD = _G.AutoJunkDestroyerRuntime or {} +AJD.Shard = AJD.Shard or {} diff --git a/UI.lua b/UI.lua new file mode 100644 index 0000000..ab04f12 --- /dev/null +++ b/UI.lua @@ -0,0 +1,17 @@ +-- File: UI.lua +-- UI namespace/wiring for AutoJunkDestroyer runtime. + +local AJD = _G.AutoJunkDestroyerRuntime or {} +AJD.UI = AJD.UI or {} + +function AJD.UI.TogglePopup() + if AJD.TogglePopup then + AJD.TogglePopup() + end +end + +function AJD.UI.ButtonCommand(arg) + if AJD.HandleButtonCommand then + AJD.HandleButtonCommand(arg) + end +end diff --git a/scripts/check_locale_parity.py b/scripts/check_locale_parity.py new file mode 100755 index 0000000..6191fa6 --- /dev/null +++ b/scripts/check_locale_parity.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +import glob +import re +import sys + + +def locale_keys(path: str): + with open(path, encoding='utf-8') as f: + text = f.read() + return set(re.findall(r'L\["([^"]+)"\]\s*=', text)) + + +def main() -> int: + base_path = 'Locales/enUS.lua' + base = locale_keys(base_path) + ok = True + for path in sorted(glob.glob('Locales/*.lua')): + keys = locale_keys(path) + missing = sorted(base - keys) + extra = sorted(keys - base) + if missing or extra: + ok = False + print(f'{path}: missing={len(missing)} extra={len(extra)}') + if missing: + print(' missing keys:', ', '.join(missing[:10])) + if extra: + print(' extra keys:', ', '.join(extra[:10])) + if ok: + print(f'Locale key parity OK across {len(glob.glob("Locales/*.lua"))} files') + return 0 + return 1 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/scripts/check_lua_syntax.sh b/scripts/check_lua_syntax.sh new file mode 100755 index 0000000..287513e --- /dev/null +++ b/scripts/check_lua_syntax.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +if ! command -v luac >/dev/null 2>&1; then + echo "luac not found; install lua5.1 or lua to run syntax checks" >&2 + exit 1 +fi + +files=(AutoJunkDestroyer.lua Migration.lua Core.lua UI.lua Minimap.lua Shard.lua Commands.lua) +while IFS= read -r f; do + files+=("$f") +done < <(find Locales -maxdepth 1 -type f -name '*.lua' | sort) + +for f in "${files[@]}"; do + luac -p "$f" +done + +echo "Lua syntax checks passed for ${#files[@]} files" From 430abb2e0302c7f73f37fc45eb141bc27e68d9fe Mon Sep 17 00:00:00 2001 From: Milestorme <44911744+milestorme@users.noreply.github.com> Date: Sat, 14 Feb 2026 11:31:31 +0800 Subject: [PATCH 2/5] Translate new locale keys for non-English languages --- CHANGELOG.md | 1 + Locales/deDE.lua | 24 ++++++++++++------------ Locales/esES.lua | 24 ++++++++++++------------ Locales/esMX.lua | 24 ++++++++++++------------ Locales/frFR.lua | 24 ++++++++++++------------ Locales/itIT.lua | 24 ++++++++++++------------ Locales/koKR.lua | 24 ++++++++++++------------ Locales/ptBR.lua | 24 ++++++++++++------------ Locales/ruRU.lua | 24 ++++++++++++------------ Locales/zhCN.lua | 24 ++++++++++++------------ Locales/zhTW.lua | 24 ++++++++++++------------ 11 files changed, 121 insertions(+), 120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca9e8bd..e13435c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Changed - Localized remaining hardcoded slash-command output strings (popup position, minimap position, and help text). +- Translated newly added slash/minimap/popup status keys into each locale language (instead of English placeholders). - Improved AceDB pre-logout wrapping notes/guards for forward compatibility diagnostics. - Updated README slash command docs for pause/resume/status behavior. diff --git a/Locales/deDE.lua b/Locales/deDE.lua index 6676226..8ae0ef5 100644 --- a/Locales/deDE.lua +++ b/Locales/deDE.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "Seelensplitter" L["MSG_LOADED"] = "Geladen." -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "Status: benutzerPausiert=%s, effektivPausiert=%s, imSchlachtfeld=%s, imKampf=%s, buttonSichtbar=%s" +L["MSG_MINIMAP_USAGE"] = "Nutzung: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "Minimap-Pos (gespeichert): %s | versteckt=%s | gesperrt=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "Popup-Pos (gespeichert): xVersatz=%s yVersatz=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "Popup-Pos (gespeichert): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "Popup-Pos noch nicht gespeichert. Aktuell links=%s oben=%s" +L["MSG_HELP_PAUSE"] = "Befehl: /ajd pause" +L["MSG_HELP_RESUME"] = "Befehl: /ajd resume" +L["MSG_HELP_STATUS"] = "Befehl: /ajd status" +L["MSG_HELP_TOGGLE"] = "Befehl: /ajd toggle" +L["MSG_HELP_THRESHOLD"] = "Befehl: /ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "Befehl: /ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/esES.lua b/Locales/esES.lua index a159ca6..adffedd 100644 --- a/Locales/esES.lua +++ b/Locales/esES.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "Fragmento de alma" L["MSG_LOADED"] = "Cargado." -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "Estado: pausaUsuario=%s, pausaEfectiva=%s, enCampoDeBatalla=%s, enCombate=%s, botonVisible=%s" +L["MSG_MINIMAP_USAGE"] = "Uso: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "Posición minimapa (guardada): %s | oculto=%s | bloqueado=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "Posición del popup (guardada): xDespl=%s yDespl=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "Posición del popup (guardada): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "La posición del popup aún no se guardó. Actual izquierda=%s arriba=%s" +L["MSG_HELP_PAUSE"] = "Comando: /ajd pause" +L["MSG_HELP_RESUME"] = "Comando: /ajd resume" +L["MSG_HELP_STATUS"] = "Comando: /ajd status" +L["MSG_HELP_TOGGLE"] = "Comando: /ajd toggle" +L["MSG_HELP_THRESHOLD"] = "Comando: /ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/esMX.lua b/Locales/esMX.lua index 82bb9d1..34dc304 100644 --- a/Locales/esMX.lua +++ b/Locales/esMX.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "Fragmento de alma" L["MSG_LOADED"] = "Cargado." -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "Estado: pausaUsuario=%s, pausaEfectiva=%s, enCampoDeBatalla=%s, enCombate=%s, botonVisible=%s" +L["MSG_MINIMAP_USAGE"] = "Uso: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "Posición del minimapa (guardada): %s | oculto=%s | bloqueado=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "Posición del popup (guardada): xDespl=%s yDespl=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "Posición del popup (guardada): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "La posición del popup aún no se guardó. Actual izquierda=%s arriba=%s" +L["MSG_HELP_PAUSE"] = "Comando: /ajd pause" +L["MSG_HELP_RESUME"] = "Comando: /ajd resume" +L["MSG_HELP_STATUS"] = "Comando: /ajd status" +L["MSG_HELP_TOGGLE"] = "Comando: /ajd toggle" +L["MSG_HELP_THRESHOLD"] = "Comando: /ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/frFR.lua b/Locales/frFR.lua index befc83a..a63073b 100644 --- a/Locales/frFR.lua +++ b/Locales/frFR.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "Fragment d’âme" L["MSG_LOADED"] = "Chargé." -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "Statut : pauseUtilisateur=%s, pauseEffective=%s, enChampDeBataille=%s, enCombat=%s, boutonVisible=%s" +L["MSG_MINIMAP_USAGE"] = "Utilisation : /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "Position minimap (enregistrée) : %s | cachée=%s | verrouillée=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "Position popup (enregistrée) : xDécalage=%s yDécalage=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "Position popup (enregistrée) : x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "Position popup pas encore enregistrée. Position actuelle gauche=%s haut=%s" +L["MSG_HELP_PAUSE"] = "Commande : /ajd pause" +L["MSG_HELP_RESUME"] = "Commande : /ajd resume" +L["MSG_HELP_STATUS"] = "Commande : /ajd status" +L["MSG_HELP_TOGGLE"] = "Commande : /ajd toggle" +L["MSG_HELP_THRESHOLD"] = "Commande : /ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "Commande : /ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/itIT.lua b/Locales/itIT.lua index de562a0..67d3425 100644 --- a/Locales/itIT.lua +++ b/Locales/itIT.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "Scheggia dell’anima" L["MSG_LOADED"] = "Caricato." -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "Stato: pausaUtente=%s, pausaEffettiva=%s, inCampoDiBattaglia=%s, inCombattimento=%s, pulsanteVisibile=%s" +L["MSG_MINIMAP_USAGE"] = "Uso: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "Posizione minimappa (salvata): %s | nascosta=%s | bloccata=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "Posizione popup (salvata): xOffset=%s yOffset=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "Posizione popup (salvata): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "Posizione popup non ancora salvata. Attuale sinistra=%s alto=%s" +L["MSG_HELP_PAUSE"] = "Comando: /ajd pause" +L["MSG_HELP_RESUME"] = "Comando: /ajd resume" +L["MSG_HELP_STATUS"] = "Comando: /ajd status" +L["MSG_HELP_TOGGLE"] = "Comando: /ajd toggle" +L["MSG_HELP_THRESHOLD"] = "Comando: /ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/koKR.lua b/Locales/koKR.lua index 4fc8376..f816a55 100644 --- a/Locales/koKR.lua +++ b/Locales/koKR.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "영혼의 조각" L["MSG_LOADED"] = "로드됨." -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "상태: 사용자일시정지=%s, 유효일시정지=%s, 전장중=%s, 전투중=%s, 버튼표시=%s" +L["MSG_MINIMAP_USAGE"] = "사용법: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "미니맵 위치(저장됨): %s | 숨김=%s | 잠금=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "팝업 위치(저장됨): x오프셋=%s y오프셋=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "팝업 위치(저장됨): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "팝업 위치가 아직 저장되지 않았습니다. 현재 left=%s top=%s" +L["MSG_HELP_PAUSE"] = "명령어: /ajd pause" +L["MSG_HELP_RESUME"] = "명령어: /ajd resume" +L["MSG_HELP_STATUS"] = "명령어: /ajd status" +L["MSG_HELP_TOGGLE"] = "명령어: /ajd toggle" +L["MSG_HELP_THRESHOLD"] = "명령어: /ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "명령어: /ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/ptBR.lua b/Locales/ptBR.lua index 77bdb50..f132edb 100644 --- a/Locales/ptBR.lua +++ b/Locales/ptBR.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "Fragmento de Alma" L["MSG_LOADED"] = "Carregado." -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "Status: pausaUsuario=%s, pausaEfetiva=%s, emCampoDeBatalha=%s, emCombate=%s, botaoVisivel=%s" +L["MSG_MINIMAP_USAGE"] = "Uso: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "Posição do minimapa (salva): %s | oculto=%s | travado=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "Posição do popup (salva): xDesloc=%s yDesloc=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "Posição do popup (salva): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "Posição do popup ainda não salva. Atual esquerda=%s topo=%s" +L["MSG_HELP_PAUSE"] = "Comando: /ajd pause" +L["MSG_HELP_RESUME"] = "Comando: /ajd resume" +L["MSG_HELP_STATUS"] = "Comando: /ajd status" +L["MSG_HELP_TOGGLE"] = "Comando: /ajd toggle" +L["MSG_HELP_THRESHOLD"] = "Comando: /ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/ruRU.lua b/Locales/ruRU.lua index a8d4922..6e5e21b 100644 --- a/Locales/ruRU.lua +++ b/Locales/ruRU.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "Осколок души" L["MSG_LOADED"] = "Загружено." -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "Статус: пользовательПауза=%s, эффективнаяПауза=%s, вПолеБоя=%s, вБою=%s, кнопкаПоказана=%s" +L["MSG_MINIMAP_USAGE"] = "Использование: /ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "Позиция миникарты (сохранена): %s | скрыта=%s | заблокирована=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "Позиция окна (сохранена): xСмещение=%s yСмещение=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "Позиция окна (сохранена): x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "Позиция окна ещё не сохранена. Текущая left=%s top=%s" +L["MSG_HELP_PAUSE"] = "Команда: /ajd pause" +L["MSG_HELP_RESUME"] = "Команда: /ajd resume" +L["MSG_HELP_STATUS"] = "Команда: /ajd status" +L["MSG_HELP_TOGGLE"] = "Команда: /ajd toggle" +L["MSG_HELP_THRESHOLD"] = "Команда: /ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "Команда: /ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index f48877c..4d3a087 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "灵魂碎片" L["MSG_LOADED"] = "已加载。" -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "状态:用户暂停=%s,实际暂停=%s,位于战场=%s,战斗中=%s,按钮显示=%s" +L["MSG_MINIMAP_USAGE"] = "用法:/ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "小地图位置(已保存):%s | 隐藏=%s | 锁定=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "弹窗位置(已保存):x偏移=%s y偏移=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "弹窗位置(已保存):x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "弹窗位置尚未保存。当前 left=%s top=%s" +L["MSG_HELP_PAUSE"] = "命令:/ajd pause" +L["MSG_HELP_RESUME"] = "命令:/ajd resume" +L["MSG_HELP_STATUS"] = "命令:/ajd status" +L["MSG_HELP_TOGGLE"] = "命令:/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "命令:/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "命令:/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/zhTW.lua b/Locales/zhTW.lua index 89bd697..2723166 100644 --- a/Locales/zhTW.lua +++ b/Locales/zhTW.lua @@ -47,17 +47,17 @@ L["SOUL_SHARD"] = "靈魂碎片" L["MSG_LOADED"] = "已載入。" -L["MSG_STATUS"] = "Status: userPaused=%s, effectivePaused=%s, inBattleground=%s, inCombat=%s, buttonShown=%s" -L["MSG_MINIMAP_USAGE"] = "Usage: /ajd minimap hide|show|lock|unlock|reset|pos" -L["MSG_MINIMAP_POS_SAVED"] = "MinimapPos (saved): %s | hide=%s | lock=%s" -L["MSG_POPUP_POS_SAVED_REL"] = "PopupPos (saved): xOfs=%s yOfs=%s (%s)" -L["MSG_POPUP_POS_SAVED_ABS"] = "PopupPos (saved): x=%s y=%s" -L["MSG_POPUP_POS_NOT_SAVED"] = "PopupPos not saved yet. Current left=%s top=%s" -L["MSG_HELP_PAUSE"] = "/ajd pause" -L["MSG_HELP_RESUME"] = "/ajd resume" -L["MSG_HELP_STATUS"] = "/ajd status" -L["MSG_HELP_TOGGLE"] = "/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["MSG_STATUS"] = "狀態:使用者暫停=%s,實際暫停=%s,位於戰場=%s,戰鬥中=%s,按鈕顯示=%s" +L["MSG_MINIMAP_USAGE"] = "用法:/ajd minimap hide|show|lock|unlock|reset|pos" +L["MSG_MINIMAP_POS_SAVED"] = "小地圖位置(已儲存):%s | 隱藏=%s | 鎖定=%s" +L["MSG_POPUP_POS_SAVED_REL"] = "彈出視窗位置(已儲存):x偏移=%s y偏移=%s (%s)" +L["MSG_POPUP_POS_SAVED_ABS"] = "彈出視窗位置(已儲存):x=%s y=%s" +L["MSG_POPUP_POS_NOT_SAVED"] = "彈出視窗位置尚未儲存。目前 left=%s top=%s" +L["MSG_HELP_PAUSE"] = "指令:/ajd pause" +L["MSG_HELP_RESUME"] = "指令:/ajd resume" +L["MSG_HELP_STATUS"] = "指令:/ajd status" +L["MSG_HELP_TOGGLE"] = "指令:/ajd toggle" +L["MSG_HELP_THRESHOLD"] = "指令:/ajd threshold 90" +L["MSG_HELP_MINIMAP_RESET"] = "指令:/ajd minimap reset" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " From 4ca2641198ad4e8704ae62104a2d1e94cb5824f4 Mon Sep 17 00:00:00 2001 From: Milestorme <44911744+milestorme@users.noreply.github.com> Date: Sat, 14 Feb 2026 11:31:39 +0800 Subject: [PATCH 3/5] Add localized slash-command aliases for non-English keyboard usage --- CHANGELOG.md | 1 + Commands.lua | 79 ++++++++++++++++++++++++++++++++++++++++-------- Locales/deDE.lua | 25 +++++++++++---- Locales/enUS.lua | 13 ++++++++ Locales/esES.lua | 25 +++++++++++---- Locales/esMX.lua | 25 +++++++++++---- Locales/frFR.lua | 23 +++++++++++--- Locales/itIT.lua | 25 +++++++++++---- Locales/koKR.lua | 25 +++++++++++---- Locales/ptBR.lua | 25 +++++++++++---- Locales/ruRU.lua | 25 +++++++++++---- Locales/zhCN.lua | 25 +++++++++++---- Locales/zhTW.lua | 25 +++++++++++---- README.md | 3 ++ 14 files changed, 272 insertions(+), 72 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e13435c..5beb20e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ## 1.2.0 ### Added - Added explicit `/ajd resume` and `/ajd status` slash commands. +- Added localized slash-command aliases for core and minimap subcommands across non-English locales. - Added dedicated `Commands.lua` module to separate slash routing from core logic. - Added CI workflow and scripts for Lua syntax checks and locale key parity. diff --git a/Commands.lua b/Commands.lua index aecd2e5..a29e88d 100644 --- a/Commands.lua +++ b/Commands.lua @@ -1,46 +1,99 @@ -- File: Commands.lua --- Slash command router module +-- Slash command router module with localized aliases. local AJD = _G.AutoJunkDestroyerRuntime or {} +local L = AJD.L or {} + +local function buildAliasMap(raw) + local map = {} + if type(raw) ~= "string" then + return map + end + for part in raw:gmatch("[^,]+") do + local alias = part:match("^%s*(.-)%s*$") + if alias and alias ~= "" then + map[alias:lower()] = true + end + end + return map +end + +local ALIAS = { + pause = buildAliasMap(L["CMD_ALIAS_PAUSE"] or "pause"), + resume = buildAliasMap(L["CMD_ALIAS_RESUME"] or "resume"), + status = buildAliasMap(L["CMD_ALIAS_STATUS"] or "status"), + toggle = buildAliasMap(L["CMD_ALIAS_TOGGLE"] or "toggle"), + threshold = buildAliasMap(L["CMD_ALIAS_THRESHOLD"] or "threshold"), + button = buildAliasMap(L["CMD_ALIAS_BUTTON"] or "button"), + minimap = buildAliasMap(L["CMD_ALIAS_MINIMAP"] or "minimap"), + mm_hide = buildAliasMap(L["CMD_ALIAS_MINIMAP_HIDE"] or "hide"), + mm_show = buildAliasMap(L["CMD_ALIAS_MINIMAP_SHOW"] or "show"), + mm_lock = buildAliasMap(L["CMD_ALIAS_MINIMAP_LOCK"] or "lock"), + mm_unlock = buildAliasMap(L["CMD_ALIAS_MINIMAP_UNLOCK"] or "unlock"), + mm_reset = buildAliasMap(L["CMD_ALIAS_MINIMAP_RESET"] or "reset"), + mm_pos = buildAliasMap(L["CMD_ALIAS_MINIMAP_POS"] or "pos"), +} + +local function isAlias(kind, token) + if not token then return false end + local set = ALIAS[kind] + return set and set[token:lower()] +end SLASH_AUTOJUNKDESTROYER1 = "/ajd" SlashCmdList.AUTOJUNKDESTROYER = function(msg) msg = (msg or ""):lower() - if msg == "pause" then + local cmd, rest = msg:match("^(%S+)%s*(.*)$") + if not cmd then + AJD.PrintHelp() + return + end + + if isAlias("pause", cmd) then (AJD.Core and AJD.Core.TogglePause and AJD.Core.TogglePause() or AJD.TogglePause()) return end - if msg == "resume" then + if isAlias("resume", cmd) then (AJD.Core and AJD.Core.Resume and AJD.Core.Resume() or AJD.Resume()) return end - if msg == "status" then + if isAlias("status", cmd) then (AJD.Core and AJD.Core.PrintStatus and AJD.Core.PrintStatus() or AJD.PrintStatus()) return end - if msg:match("^threshold") then - local arg = msg:match("^threshold%s*(.*)$") or "" - AJD.SetThreshold(arg) + if isAlias("threshold", cmd) then + AJD.SetThreshold(rest or "") return end - if msg:match("^button") then - local arg = (msg:match("^button%s*(.*)$") or ""):lower() + if isAlias("button", cmd) then + local arg = (rest or ""):lower() (AJD.UI and AJD.UI.ButtonCommand and AJD.UI.ButtonCommand(arg) or AJD.HandleButtonCommand(arg)) return end - if msg:match("^minimap") then - local arg = (msg:match("^minimap%s*(.*)$") or ""):lower() - (AJD.Minimap and AJD.Minimap.Command and AJD.Minimap.Command(arg) or AJD.HandleMinimapCommand(arg)) + if isAlias("minimap", cmd) then + local mm = (rest or ""):match("^(%S+)") + local normalized = (rest or ""):lower() + if mm and mm ~= "" then + local token = mm:lower() + if isAlias("mm_hide", token) then normalized = "hide" + elseif isAlias("mm_show", token) then normalized = "show" + elseif isAlias("mm_lock", token) then normalized = "lock" + elseif isAlias("mm_unlock", token) then normalized = "unlock" + elseif isAlias("mm_reset", token) then normalized = "reset" + elseif isAlias("mm_pos", token) then normalized = "pos" + end + end + (AJD.Minimap and AJD.Minimap.Command and AJD.Minimap.Command(normalized) or AJD.HandleMinimapCommand(normalized)) return end - if msg == "toggle" then + if isAlias("toggle", cmd) then (AJD.UI and AJD.UI.TogglePopup and AJD.UI.TogglePopup() or AJD.TogglePopup()) return end diff --git a/Locales/deDE.lua b/Locales/deDE.lua index 8ae0ef5..c3094a9 100644 --- a/Locales/deDE.lua +++ b/Locales/deDE.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "Minimap-Pos (gespeichert): %s | versteckt=%s | ges L["MSG_POPUP_POS_SAVED_REL"] = "Popup-Pos (gespeichert): xVersatz=%s yVersatz=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "Popup-Pos (gespeichert): x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "Popup-Pos noch nicht gespeichert. Aktuell links=%s oben=%s" -L["MSG_HELP_PAUSE"] = "Befehl: /ajd pause" -L["MSG_HELP_RESUME"] = "Befehl: /ajd resume" -L["MSG_HELP_STATUS"] = "Befehl: /ajd status" -L["MSG_HELP_TOGGLE"] = "Befehl: /ajd toggle" -L["MSG_HELP_THRESHOLD"] = "Befehl: /ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "Befehl: /ajd minimap reset" +L["MSG_HELP_PAUSE"] = "Befehl: /ajd pausieren" +L["MSG_HELP_RESUME"] = "Befehl: /ajd fortsetzen" +L["MSG_HELP_STATUS"] = "Befehl: /ajd zustand" +L["MSG_HELP_TOGGLE"] = "Befehl: /ajd umschalten" +L["MSG_HELP_THRESHOLD"] = "Befehl: /ajd schwelle 90" +L["MSG_HELP_MINIMAP_RESET"] = "Befehl: /ajd mini zuruecksetzen" +L["CMD_ALIAS_PAUSE"] = "pause,pausieren" +L["CMD_ALIAS_RESUME"] = "resume,fortsetzen" +L["CMD_ALIAS_STATUS"] = "status,zustand" +L["CMD_ALIAS_TOGGLE"] = "toggle,umschalten" +L["CMD_ALIAS_THRESHOLD"] = "threshold,schwelle" +L["CMD_ALIAS_BUTTON"] = "button,knopf" +L["CMD_ALIAS_MINIMAP"] = "minimap,mini" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,verstecken" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,zeigen" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,sperren" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,entsperren" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,zuruecksetzen" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,position" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/enUS.lua b/Locales/enUS.lua index c05856e..0cabaa9 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -70,5 +70,18 @@ L["MSG_HELP_STATUS"] = "/ajd status" L["MSG_HELP_TOGGLE"] = "/ajd toggle" L["MSG_HELP_THRESHOLD"] = "/ajd threshold 90" L["MSG_HELP_MINIMAP_RESET"] = "/ajd minimap reset" +L["CMD_ALIAS_PAUSE"] = "pause" +L["CMD_ALIAS_RESUME"] = "resume" +L["CMD_ALIAS_STATUS"] = "status" +L["CMD_ALIAS_TOGGLE"] = "toggle" +L["CMD_ALIAS_THRESHOLD"] = "threshold" +L["CMD_ALIAS_BUTTON"] = "button" +L["CMD_ALIAS_MINIMAP"] = "minimap" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset" +L["CMD_ALIAS_MINIMAP_POS"] = "pos" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/esES.lua b/Locales/esES.lua index adffedd..0aa52b9 100644 --- a/Locales/esES.lua +++ b/Locales/esES.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "Posición minimapa (guardada): %s | oculto=%s | bl L["MSG_POPUP_POS_SAVED_REL"] = "Posición del popup (guardada): xDespl=%s yDespl=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "Posición del popup (guardada): x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "La posición del popup aún no se guardó. Actual izquierda=%s arriba=%s" -L["MSG_HELP_PAUSE"] = "Comando: /ajd pause" -L["MSG_HELP_RESUME"] = "Comando: /ajd resume" -L["MSG_HELP_STATUS"] = "Comando: /ajd status" -L["MSG_HELP_TOGGLE"] = "Comando: /ajd toggle" -L["MSG_HELP_THRESHOLD"] = "Comando: /ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd minimap reset" +L["MSG_HELP_PAUSE"] = "Comando: /ajd pausa" +L["MSG_HELP_RESUME"] = "Comando: /ajd reanudar" +L["MSG_HELP_STATUS"] = "Comando: /ajd estado" +L["MSG_HELP_TOGGLE"] = "Comando: /ajd alternar" +L["MSG_HELP_THRESHOLD"] = "Comando: /ajd umbral 90" +L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd mini reiniciar" +L["CMD_ALIAS_PAUSE"] = "pause,pausa" +L["CMD_ALIAS_RESUME"] = "resume,reanudar" +L["CMD_ALIAS_STATUS"] = "status,estado" +L["CMD_ALIAS_TOGGLE"] = "toggle,alternar" +L["CMD_ALIAS_THRESHOLD"] = "threshold,umbral" +L["CMD_ALIAS_BUTTON"] = "button,boton" +L["CMD_ALIAS_MINIMAP"] = "minimap,mini" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,ocultar" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,mostrar" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,bloquear" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,desbloquear" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,reiniciar" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,posicion" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/esMX.lua b/Locales/esMX.lua index 34dc304..eebe62f 100644 --- a/Locales/esMX.lua +++ b/Locales/esMX.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "Posición del minimapa (guardada): %s | oculto=%s L["MSG_POPUP_POS_SAVED_REL"] = "Posición del popup (guardada): xDespl=%s yDespl=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "Posición del popup (guardada): x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "La posición del popup aún no se guardó. Actual izquierda=%s arriba=%s" -L["MSG_HELP_PAUSE"] = "Comando: /ajd pause" -L["MSG_HELP_RESUME"] = "Comando: /ajd resume" -L["MSG_HELP_STATUS"] = "Comando: /ajd status" -L["MSG_HELP_TOGGLE"] = "Comando: /ajd toggle" -L["MSG_HELP_THRESHOLD"] = "Comando: /ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd minimap reset" +L["MSG_HELP_PAUSE"] = "Comando: /ajd pausa" +L["MSG_HELP_RESUME"] = "Comando: /ajd reanudar" +L["MSG_HELP_STATUS"] = "Comando: /ajd estado" +L["MSG_HELP_TOGGLE"] = "Comando: /ajd alternar" +L["MSG_HELP_THRESHOLD"] = "Comando: /ajd umbral 90" +L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd mini reiniciar" +L["CMD_ALIAS_PAUSE"] = "pause,pausa" +L["CMD_ALIAS_RESUME"] = "resume,reanudar" +L["CMD_ALIAS_STATUS"] = "status,estado" +L["CMD_ALIAS_TOGGLE"] = "toggle,alternar" +L["CMD_ALIAS_THRESHOLD"] = "threshold,umbral" +L["CMD_ALIAS_BUTTON"] = "button,boton" +L["CMD_ALIAS_MINIMAP"] = "minimap,mini" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,ocultar" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,mostrar" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,bloquear" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,desbloquear" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,reiniciar" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,posicion" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/frFR.lua b/Locales/frFR.lua index a63073b..d67028b 100644 --- a/Locales/frFR.lua +++ b/Locales/frFR.lua @@ -54,10 +54,23 @@ L["MSG_POPUP_POS_SAVED_REL"] = "Position popup (enregistrée) : xDécalage=%s yD L["MSG_POPUP_POS_SAVED_ABS"] = "Position popup (enregistrée) : x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "Position popup pas encore enregistrée. Position actuelle gauche=%s haut=%s" L["MSG_HELP_PAUSE"] = "Commande : /ajd pause" -L["MSG_HELP_RESUME"] = "Commande : /ajd resume" -L["MSG_HELP_STATUS"] = "Commande : /ajd status" -L["MSG_HELP_TOGGLE"] = "Commande : /ajd toggle" -L["MSG_HELP_THRESHOLD"] = "Commande : /ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "Commande : /ajd minimap reset" +L["MSG_HELP_RESUME"] = "Commande : /ajd reprendre" +L["MSG_HELP_STATUS"] = "Commande : /ajd etat" +L["MSG_HELP_TOGGLE"] = "Commande : /ajd basculer" +L["MSG_HELP_THRESHOLD"] = "Commande : /ajd seuil 90" +L["MSG_HELP_MINIMAP_RESET"] = "Commande : /ajd mini reinit" +L["CMD_ALIAS_PAUSE"] = "pause" +L["CMD_ALIAS_RESUME"] = "resume,reprendre" +L["CMD_ALIAS_STATUS"] = "status,etat" +L["CMD_ALIAS_TOGGLE"] = "toggle,basculer" +L["CMD_ALIAS_THRESHOLD"] = "threshold,seuil" +L["CMD_ALIAS_BUTTON"] = "button,bouton" +L["CMD_ALIAS_MINIMAP"] = "minimap,mini" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,cacher" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,afficher" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,verrouiller" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,deverrouiller" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,reinit" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,position" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/itIT.lua b/Locales/itIT.lua index 67d3425..c40815b 100644 --- a/Locales/itIT.lua +++ b/Locales/itIT.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "Posizione minimappa (salvata): %s | nascosta=%s | L["MSG_POPUP_POS_SAVED_REL"] = "Posizione popup (salvata): xOffset=%s yOffset=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "Posizione popup (salvata): x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "Posizione popup non ancora salvata. Attuale sinistra=%s alto=%s" -L["MSG_HELP_PAUSE"] = "Comando: /ajd pause" -L["MSG_HELP_RESUME"] = "Comando: /ajd resume" -L["MSG_HELP_STATUS"] = "Comando: /ajd status" -L["MSG_HELP_TOGGLE"] = "Comando: /ajd toggle" -L["MSG_HELP_THRESHOLD"] = "Comando: /ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd minimap reset" +L["MSG_HELP_PAUSE"] = "Comando: /ajd pausa" +L["MSG_HELP_RESUME"] = "Comando: /ajd riprendi" +L["MSG_HELP_STATUS"] = "Comando: /ajd stato" +L["MSG_HELP_TOGGLE"] = "Comando: /ajd commuta" +L["MSG_HELP_THRESHOLD"] = "Comando: /ajd soglia 90" +L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd mini resetta" +L["CMD_ALIAS_PAUSE"] = "pause,pausa" +L["CMD_ALIAS_RESUME"] = "resume,riprendi" +L["CMD_ALIAS_STATUS"] = "status,stato" +L["CMD_ALIAS_TOGGLE"] = "toggle,commuta" +L["CMD_ALIAS_THRESHOLD"] = "threshold,soglia" +L["CMD_ALIAS_BUTTON"] = "button,pulsante" +L["CMD_ALIAS_MINIMAP"] = "minimap,mini" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,nascondi" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,mostra" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,blocca" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,sblocca" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,resetta" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,posizione" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/koKR.lua b/Locales/koKR.lua index f816a55..93d2158 100644 --- a/Locales/koKR.lua +++ b/Locales/koKR.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "미니맵 위치(저장됨): %s | 숨김=%s | 잠 L["MSG_POPUP_POS_SAVED_REL"] = "팝업 위치(저장됨): x오프셋=%s y오프셋=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "팝업 위치(저장됨): x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "팝업 위치가 아직 저장되지 않았습니다. 현재 left=%s top=%s" -L["MSG_HELP_PAUSE"] = "명령어: /ajd pause" -L["MSG_HELP_RESUME"] = "명령어: /ajd resume" -L["MSG_HELP_STATUS"] = "명령어: /ajd status" -L["MSG_HELP_TOGGLE"] = "명령어: /ajd toggle" -L["MSG_HELP_THRESHOLD"] = "명령어: /ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "명령어: /ajd minimap reset" +L["MSG_HELP_PAUSE"] = "명령어: /ajd 일시정지" +L["MSG_HELP_RESUME"] = "명령어: /ajd 재개" +L["MSG_HELP_STATUS"] = "명령어: /ajd 상태" +L["MSG_HELP_TOGGLE"] = "명령어: /ajd 전환" +L["MSG_HELP_THRESHOLD"] = "명령어: /ajd 임계값 90" +L["MSG_HELP_MINIMAP_RESET"] = "명령어: /ajd 미니맵 초기화" +L["CMD_ALIAS_PAUSE"] = "pause,일시정지" +L["CMD_ALIAS_RESUME"] = "resume,재개" +L["CMD_ALIAS_STATUS"] = "status,상태" +L["CMD_ALIAS_TOGGLE"] = "toggle,전환" +L["CMD_ALIAS_THRESHOLD"] = "threshold,임계값" +L["CMD_ALIAS_BUTTON"] = "button,버튼" +L["CMD_ALIAS_MINIMAP"] = "minimap,미니맵" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,숨김" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,표시" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,잠금" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,잠금해제" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,초기화" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,위치" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/ptBR.lua b/Locales/ptBR.lua index f132edb..52c838c 100644 --- a/Locales/ptBR.lua +++ b/Locales/ptBR.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "Posição do minimapa (salva): %s | oculto=%s | tr L["MSG_POPUP_POS_SAVED_REL"] = "Posição do popup (salva): xDesloc=%s yDesloc=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "Posição do popup (salva): x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "Posição do popup ainda não salva. Atual esquerda=%s topo=%s" -L["MSG_HELP_PAUSE"] = "Comando: /ajd pause" -L["MSG_HELP_RESUME"] = "Comando: /ajd resume" -L["MSG_HELP_STATUS"] = "Comando: /ajd status" -L["MSG_HELP_TOGGLE"] = "Comando: /ajd toggle" -L["MSG_HELP_THRESHOLD"] = "Comando: /ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd minimap reset" +L["MSG_HELP_PAUSE"] = "Comando: /ajd pausar" +L["MSG_HELP_RESUME"] = "Comando: /ajd retomar" +L["MSG_HELP_STATUS"] = "Comando: /ajd estado" +L["MSG_HELP_TOGGLE"] = "Comando: /ajd alternar" +L["MSG_HELP_THRESHOLD"] = "Comando: /ajd limiar 90" +L["MSG_HELP_MINIMAP_RESET"] = "Comando: /ajd mini redefinir" +L["CMD_ALIAS_PAUSE"] = "pause,pausar" +L["CMD_ALIAS_RESUME"] = "resume,retomar" +L["CMD_ALIAS_STATUS"] = "status,estado" +L["CMD_ALIAS_TOGGLE"] = "toggle,alternar" +L["CMD_ALIAS_THRESHOLD"] = "threshold,limiar" +L["CMD_ALIAS_BUTTON"] = "button,botao" +L["CMD_ALIAS_MINIMAP"] = "minimap,mini" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,ocultar" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,mostrar" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,bloquear" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,desbloquear" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,redefinir" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,posicao" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/ruRU.lua b/Locales/ruRU.lua index 6e5e21b..145d9ba 100644 --- a/Locales/ruRU.lua +++ b/Locales/ruRU.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "Позиция миникарты (сохране L["MSG_POPUP_POS_SAVED_REL"] = "Позиция окна (сохранена): xСмещение=%s yСмещение=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "Позиция окна (сохранена): x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "Позиция окна ещё не сохранена. Текущая left=%s top=%s" -L["MSG_HELP_PAUSE"] = "Команда: /ajd pause" -L["MSG_HELP_RESUME"] = "Команда: /ajd resume" -L["MSG_HELP_STATUS"] = "Команда: /ajd status" -L["MSG_HELP_TOGGLE"] = "Команда: /ajd toggle" -L["MSG_HELP_THRESHOLD"] = "Команда: /ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "Команда: /ajd minimap reset" +L["MSG_HELP_PAUSE"] = "Команда: /ajd пауза" +L["MSG_HELP_RESUME"] = "Команда: /ajd продолжить" +L["MSG_HELP_STATUS"] = "Команда: /ajd статус" +L["MSG_HELP_TOGGLE"] = "Команда: /ajd переключить" +L["MSG_HELP_THRESHOLD"] = "Команда: /ajd порог 90" +L["MSG_HELP_MINIMAP_RESET"] = "Команда: /ajd миникарта сброс" +L["CMD_ALIAS_PAUSE"] = "pause,пауза" +L["CMD_ALIAS_RESUME"] = "resume,продолжить" +L["CMD_ALIAS_STATUS"] = "status,статус" +L["CMD_ALIAS_TOGGLE"] = "toggle,переключить" +L["CMD_ALIAS_THRESHOLD"] = "threshold,порог" +L["CMD_ALIAS_BUTTON"] = "button,кнопка" +L["CMD_ALIAS_MINIMAP"] = "minimap,миникарта" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,скрыть" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,показать" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,закрепить" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,открепить" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,сброс" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,позиция" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index 4d3a087..3d5e312 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "小地图位置(已保存):%s | 隐藏=%s | L["MSG_POPUP_POS_SAVED_REL"] = "弹窗位置(已保存):x偏移=%s y偏移=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "弹窗位置(已保存):x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "弹窗位置尚未保存。当前 left=%s top=%s" -L["MSG_HELP_PAUSE"] = "命令:/ajd pause" -L["MSG_HELP_RESUME"] = "命令:/ajd resume" -L["MSG_HELP_STATUS"] = "命令:/ajd status" -L["MSG_HELP_TOGGLE"] = "命令:/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "命令:/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "命令:/ajd minimap reset" +L["MSG_HELP_PAUSE"] = "命令:/ajd 暂停" +L["MSG_HELP_RESUME"] = "命令:/ajd 继续" +L["MSG_HELP_STATUS"] = "命令:/ajd 状态" +L["MSG_HELP_TOGGLE"] = "命令:/ajd 切换" +L["MSG_HELP_THRESHOLD"] = "命令:/ajd 阈值 90" +L["MSG_HELP_MINIMAP_RESET"] = "命令:/ajd 小地图 重置" +L["CMD_ALIAS_PAUSE"] = "pause,暂停" +L["CMD_ALIAS_RESUME"] = "resume,继续" +L["CMD_ALIAS_STATUS"] = "status,状态" +L["CMD_ALIAS_TOGGLE"] = "toggle,切换" +L["CMD_ALIAS_THRESHOLD"] = "threshold,阈值" +L["CMD_ALIAS_BUTTON"] = "button,按钮" +L["CMD_ALIAS_MINIMAP"] = "minimap,小地图" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,隐藏" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,显示" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,锁定" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,解锁" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,重置" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,位置" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/Locales/zhTW.lua b/Locales/zhTW.lua index 2723166..3eb0296 100644 --- a/Locales/zhTW.lua +++ b/Locales/zhTW.lua @@ -53,11 +53,24 @@ L["MSG_MINIMAP_POS_SAVED"] = "小地圖位置(已儲存):%s | 隱藏=%s | L["MSG_POPUP_POS_SAVED_REL"] = "彈出視窗位置(已儲存):x偏移=%s y偏移=%s (%s)" L["MSG_POPUP_POS_SAVED_ABS"] = "彈出視窗位置(已儲存):x=%s y=%s" L["MSG_POPUP_POS_NOT_SAVED"] = "彈出視窗位置尚未儲存。目前 left=%s top=%s" -L["MSG_HELP_PAUSE"] = "指令:/ajd pause" -L["MSG_HELP_RESUME"] = "指令:/ajd resume" -L["MSG_HELP_STATUS"] = "指令:/ajd status" -L["MSG_HELP_TOGGLE"] = "指令:/ajd toggle" -L["MSG_HELP_THRESHOLD"] = "指令:/ajd threshold 90" -L["MSG_HELP_MINIMAP_RESET"] = "指令:/ajd minimap reset" +L["MSG_HELP_PAUSE"] = "指令:/ajd 暫停" +L["MSG_HELP_RESUME"] = "指令:/ajd 繼續" +L["MSG_HELP_STATUS"] = "指令:/ajd 狀態" +L["MSG_HELP_TOGGLE"] = "指令:/ajd 切換" +L["MSG_HELP_THRESHOLD"] = "指令:/ajd 臨界值 90" +L["MSG_HELP_MINIMAP_RESET"] = "指令:/ajd 小地圖 重設" +L["CMD_ALIAS_PAUSE"] = "pause,暫停" +L["CMD_ALIAS_RESUME"] = "resume,繼續" +L["CMD_ALIAS_STATUS"] = "status,狀態" +L["CMD_ALIAS_TOGGLE"] = "toggle,切換" +L["CMD_ALIAS_THRESHOLD"] = "threshold,臨界值" +L["CMD_ALIAS_BUTTON"] = "button,按鈕" +L["CMD_ALIAS_MINIMAP"] = "minimap,小地圖" +L["CMD_ALIAS_MINIMAP_HIDE"] = "hide,隱藏" +L["CMD_ALIAS_MINIMAP_SHOW"] = "show,顯示" +L["CMD_ALIAS_MINIMAP_LOCK"] = "lock,鎖定" +L["CMD_ALIAS_MINIMAP_UNLOCK"] = "unlock,解鎖" +L["CMD_ALIAS_MINIMAP_RESET"] = "reset,重設" +L["CMD_ALIAS_MINIMAP_POS"] = "pos,位置" L["CFF00FF00_DC869E"] = "|cff00ff00" L["R_7FC9D5"] = ":|r " diff --git a/README.md b/README.md index 8c0c4c0..71dc6d5 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,6 @@ Bundled (embedded) libraries: - Minimap icon with lock/hide/reset - **Full localization**: enUS, deDE, frFR, esES, esMX, itIT, ptBR, ruRU, koKR, zhCN, zhTW + +## Localized command aliases +- Non-English locales can use localized aliases for slash subcommands (for example `/ajd 상태`, `/ajd 状态`, `/ajd статус`) in addition to English tokens. From 43a8f34369d4baa8b1932afa1caa34c81a674885 Mon Sep 17 00:00:00 2001 From: Milestorme <44911744+milestorme@users.noreply.github.com> Date: Sat, 14 Feb 2026 11:31:45 +0800 Subject: [PATCH 4/5] Fix UTF-8-safe slash alias parsing for localized commands --- CHANGELOG.md | 1 + Commands.lua | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5beb20e..1a8a884 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ### Fixed - Cleaned minor code/comment polish issues (`Print` addon-name redundancy and event comment naming). +- Fixed slash alias normalization to avoid UTF-8 breakage by lowercasing ASCII only in command parsing. ## 1.1.10 diff --git a/Commands.lua b/Commands.lua index a29e88d..d1b57b1 100644 --- a/Commands.lua +++ b/Commands.lua @@ -4,6 +4,11 @@ local AJD = _G.AutoJunkDestroyerRuntime or {} local L = AJD.L or {} +local function asciiLower(s) + if type(s) ~= "string" then return s end + return (s:gsub("%u", function(c) return string.char(string.byte(c) + 32) end)) +end + local function buildAliasMap(raw) local map = {} if type(raw) ~= "string" then @@ -12,7 +17,10 @@ local function buildAliasMap(raw) for part in raw:gmatch("[^,]+") do local alias = part:match("^%s*(.-)%s*$") if alias and alias ~= "" then - map[alias:lower()] = true + -- Keep exact alias and ASCII-lower variant. + -- This avoids UTF-8 corruption risks from string.lower on non-ASCII characters. + map[alias] = true + map[asciiLower(alias)] = true end end return map @@ -37,12 +45,12 @@ local ALIAS = { local function isAlias(kind, token) if not token then return false end local set = ALIAS[kind] - return set and set[token:lower()] + return set and (set[token] or set[asciiLower(token)]) end SLASH_AUTOJUNKDESTROYER1 = "/ajd" SlashCmdList.AUTOJUNKDESTROYER = function(msg) - msg = (msg or ""):lower() + msg = (msg or "") local cmd, rest = msg:match("^(%S+)%s*(.*)$") if not cmd then @@ -71,16 +79,16 @@ SlashCmdList.AUTOJUNKDESTROYER = function(msg) end if isAlias("button", cmd) then - local arg = (rest or ""):lower() + local arg = asciiLower(rest or "") (AJD.UI and AJD.UI.ButtonCommand and AJD.UI.ButtonCommand(arg) or AJD.HandleButtonCommand(arg)) return end if isAlias("minimap", cmd) then local mm = (rest or ""):match("^(%S+)") - local normalized = (rest or ""):lower() + local normalized = asciiLower(rest or "") if mm and mm ~= "" then - local token = mm:lower() + local token = mm if isAlias("mm_hide", token) then normalized = "hide" elseif isAlias("mm_show", token) then normalized = "show" elseif isAlias("mm_lock", token) then normalized = "lock" From f86936ead1403a2f44a0a91179d862cf3d220dd6 Mon Sep 17 00:00:00 2001 From: Milestorme <44911744+milestorme@users.noreply.github.com> Date: Sat, 14 Feb 2026 11:31:51 +0800 Subject: [PATCH 5/5] Remove slash command system and rely on minimap interactions only --- AutoJunkDestroyer-Classic.toc | 6 -- AutoJunkDestroyer-TBC.toc | 6 -- AutoJunkDestroyer.lua | 130 ---------------------------------- CHANGELOG.md | 1 + Commands.lua | 110 ---------------------------- Core.lua | 27 ------- Migration.lua | 5 -- Minimap.lua | 11 --- README.md | 8 --- Shard.lua | 5 -- UI.lua | 17 ----- scripts/check_lua_syntax.sh | 2 +- 12 files changed, 2 insertions(+), 326 deletions(-) delete mode 100644 Commands.lua delete mode 100644 Core.lua delete mode 100644 Migration.lua delete mode 100644 Minimap.lua delete mode 100644 Shard.lua delete mode 100644 UI.lua diff --git a/AutoJunkDestroyer-Classic.toc b/AutoJunkDestroyer-Classic.toc index 2a893ef..db431ec 100644 --- a/AutoJunkDestroyer-Classic.toc +++ b/AutoJunkDestroyer-Classic.toc @@ -28,9 +28,3 @@ Locales/zhCN.lua Locales/zhTW.lua AutoJunkDestroyer.lua -Migration.lua -Core.lua -UI.lua -Minimap.lua -Shard.lua -Commands.lua diff --git a/AutoJunkDestroyer-TBC.toc b/AutoJunkDestroyer-TBC.toc index 6bba717..9f7f0d7 100644 --- a/AutoJunkDestroyer-TBC.toc +++ b/AutoJunkDestroyer-TBC.toc @@ -28,9 +28,3 @@ Locales/zhCN.lua Locales/zhTW.lua AutoJunkDestroyer.lua -Migration.lua -Core.lua -UI.lua -Minimap.lua -Shard.lua -Commands.lua diff --git a/AutoJunkDestroyer.lua b/AutoJunkDestroyer.lua index 3226e2b..6b9aaa3 100644 --- a/AutoJunkDestroyer.lua +++ b/AutoJunkDestroyer.lua @@ -40,14 +40,6 @@ -- LDB.OnClick() -> Minimap click handler -- LDB.OnTooltipShow() -> Minimap tooltip text --- Slash Commands --- /ajd pause -> Toggle pause --- /ajd resume -> Explicitly resume addon --- /ajd status -> Show current addon status --- /ajd toggle -> Toggle popup visibility --- /ajd button [reset] -> Show/reset popup position --- /ajd minimap [show|hide|lock|unlock|reset|pos] - -- Event Handling -- PLAYER_LOGIN -> Initialization -- PLAYER_ENTERING_WORLD -> BG state detection @@ -59,8 +51,6 @@ local ADDON_NAME = ... local frame = CreateFrame("Frame") -local AJD = _G.AutoJunkDestroyerRuntime or {} -_G.AutoJunkDestroyerRuntime = AJD -- Localization (AceLocale-3.0) local _AceLocale = LibStub and LibStub("AceLocale-3.0", true) @@ -709,126 +699,6 @@ local function InitAceDB() Print(L["MSG_MINIMAP_ACEDB_OK"]) end -------------------------------------------------- --- Slash Command Action Exports (implemented in Commands.lua) -------------------------------------------------- -AJD.Print = Print -AJD.L = L -AJD.IsDisabledNow = function() - return paused or inBattleground or InCombat() -end -AJD.TogglePause = function() - userPaused = not userPaused - paused = userPaused or inBattleground - Print(userPaused and L["MSG_PAUSED"] or L["MSG_RESUMED"]) - UpdateButtonVisibility(true) -end -AJD.Resume = function() - userPaused = false - paused = inBattleground - Print(L["MSG_RESUMED"]) - UpdateButtonVisibility(true) -end -AJD.PrintStatus = function() - Print(string.format(L["MSG_STATUS"], tostring(userPaused), tostring(paused), tostring(inBattleground), tostring(InCombat()), tostring(button:IsShown()))) -end -AJD.SetThreshold = function(arg) - EnsureSV() - if arg == "" then - Print(string.format(L["MSG_THRESHOLD_CURRENT"], math.floor(GetBagUsageThreshold() * 100 + 0.5))) - return - end - - local v = tonumber(arg) - if not v then - Print(L["MSG_THRESHOLD_USAGE"]) - return - end - - if v > 1.0 then v = v / 100 end - if v < 0.50 then v = 0.50 end - if v > 0.99 then v = 0.99 end - - AutoJunkDestroyerDB.settings.bagUsageThreshold = v - Print(string.format(L["MSG_THRESHOLD_SET"], math.floor(v * 100 + 0.5))) - ScheduleBagRefresh(0) -end -AJD.HandleButtonCommand = function(arg) - if arg == "reset" then - ResetPopupButtonPosition() - Print(L["MSG_POPUP_RESET"]) - return - end - - EnsureSV() - local p = AutoJunkDestroyerDB.popupButtonPos - if p then - if p.point then - Print(string.format(L["MSG_POPUP_POS_SAVED_REL"], tostring(p.x), tostring(p.y), tostring(p.point))) - else - Print(string.format(L["MSG_POPUP_POS_SAVED_ABS"], tostring(p.x), tostring(p.y))) - end - else - local l, t = button:GetLeft(), button:GetTop() - Print(string.format(L["MSG_POPUP_POS_NOT_SAVED"], tostring(l), tostring(t))) - end -end -AJD.HandleMinimapCommand = function(arg) - if not db then - Print(L["MSG_MINIMAP_DB_NOT_READY"]) - return - end - - if arg == "hide" then - db.profile.minimap.hide = true - icon:Hide("AutoJunkDestroyer") - Print(L["MSG_MINIMAP_ICON_HIDDEN"]) - elseif arg == "show" then - db.profile.minimap.hide = false - icon:Show("AutoJunkDestroyer") - Print(L["MSG_MINIMAP_ICON_SHOWN"]) - elseif arg == "lock" then - db.profile.minimap.lock = true - icon:Lock("AutoJunkDestroyer") - Print(L["MSG_MINIMAP_LOCKED"]) - elseif arg == "unlock" then - db.profile.minimap.lock = false - icon:Unlock("AutoJunkDestroyer") - Print(L["MSG_MINIMAP_UNLOCKED"]) - elseif arg == "reset" then - db.profile.minimap.minimapPos = 220 - icon:Refresh("AutoJunkDestroyer", db.profile.minimap) - Print(L["MSG_MINIMAP_RESET"]) - elseif arg == "pos" or arg == "" then - Print(string.format(L["MSG_MINIMAP_POS_SAVED"], tostring(db.profile.minimap.minimapPos), tostring(db.profile.minimap.hide), tostring(db.profile.minimap.lock))) - else - Print(L["MSG_MINIMAP_USAGE"]) - end -end -AJD.TogglePopup = function() - if paused or inBattleground or InCombat() then - Print(L["MSG_DISABLED_RIGHT_NOW"]) - button:Hide() - return - end - - if button:IsShown() then - button:Hide() - Print(L["MSG_BUTTON_HIDDEN_MINIMAP"]) - else - button:Show() - UpdateButtonText() - Print(L["MSG_BUTTON_SHOWN_MINIMAP"]) - end -end -AJD.PrintHelp = function() - Print(L["MSG_HELP_PAUSE"]) - Print(L["MSG_HELP_RESUME"]) - Print(L["MSG_HELP_STATUS"]) - Print(L["MSG_HELP_TOGGLE"]) - Print(L["MSG_HELP_THRESHOLD"]) - Print(L["MSG_HELP_MINIMAP_RESET"]) -end ------------------------------------------------- -- Events diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a8a884..131e92b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Added CI workflow and scripts for Lua syntax checks and locale key parity. ### Changed +- Removed slash command support (`/ajd ...`) and standardized control via minimap left/right-click interactions. - Localized remaining hardcoded slash-command output strings (popup position, minimap position, and help text). - Translated newly added slash/minimap/popup status keys into each locale language (instead of English placeholders). - Improved AceDB pre-logout wrapping notes/guards for forward compatibility diagnostics. diff --git a/Commands.lua b/Commands.lua deleted file mode 100644 index d1b57b1..0000000 --- a/Commands.lua +++ /dev/null @@ -1,110 +0,0 @@ --- File: Commands.lua --- Slash command router module with localized aliases. - -local AJD = _G.AutoJunkDestroyerRuntime or {} -local L = AJD.L or {} - -local function asciiLower(s) - if type(s) ~= "string" then return s end - return (s:gsub("%u", function(c) return string.char(string.byte(c) + 32) end)) -end - -local function buildAliasMap(raw) - local map = {} - if type(raw) ~= "string" then - return map - end - for part in raw:gmatch("[^,]+") do - local alias = part:match("^%s*(.-)%s*$") - if alias and alias ~= "" then - -- Keep exact alias and ASCII-lower variant. - -- This avoids UTF-8 corruption risks from string.lower on non-ASCII characters. - map[alias] = true - map[asciiLower(alias)] = true - end - end - return map -end - -local ALIAS = { - pause = buildAliasMap(L["CMD_ALIAS_PAUSE"] or "pause"), - resume = buildAliasMap(L["CMD_ALIAS_RESUME"] or "resume"), - status = buildAliasMap(L["CMD_ALIAS_STATUS"] or "status"), - toggle = buildAliasMap(L["CMD_ALIAS_TOGGLE"] or "toggle"), - threshold = buildAliasMap(L["CMD_ALIAS_THRESHOLD"] or "threshold"), - button = buildAliasMap(L["CMD_ALIAS_BUTTON"] or "button"), - minimap = buildAliasMap(L["CMD_ALIAS_MINIMAP"] or "minimap"), - mm_hide = buildAliasMap(L["CMD_ALIAS_MINIMAP_HIDE"] or "hide"), - mm_show = buildAliasMap(L["CMD_ALIAS_MINIMAP_SHOW"] or "show"), - mm_lock = buildAliasMap(L["CMD_ALIAS_MINIMAP_LOCK"] or "lock"), - mm_unlock = buildAliasMap(L["CMD_ALIAS_MINIMAP_UNLOCK"] or "unlock"), - mm_reset = buildAliasMap(L["CMD_ALIAS_MINIMAP_RESET"] or "reset"), - mm_pos = buildAliasMap(L["CMD_ALIAS_MINIMAP_POS"] or "pos"), -} - -local function isAlias(kind, token) - if not token then return false end - local set = ALIAS[kind] - return set and (set[token] or set[asciiLower(token)]) -end - -SLASH_AUTOJUNKDESTROYER1 = "/ajd" -SlashCmdList.AUTOJUNKDESTROYER = function(msg) - msg = (msg or "") - - local cmd, rest = msg:match("^(%S+)%s*(.*)$") - if not cmd then - AJD.PrintHelp() - return - end - - if isAlias("pause", cmd) then - (AJD.Core and AJD.Core.TogglePause and AJD.Core.TogglePause() or AJD.TogglePause()) - return - end - - if isAlias("resume", cmd) then - (AJD.Core and AJD.Core.Resume and AJD.Core.Resume() or AJD.Resume()) - return - end - - if isAlias("status", cmd) then - (AJD.Core and AJD.Core.PrintStatus and AJD.Core.PrintStatus() or AJD.PrintStatus()) - return - end - - if isAlias("threshold", cmd) then - AJD.SetThreshold(rest or "") - return - end - - if isAlias("button", cmd) then - local arg = asciiLower(rest or "") - (AJD.UI and AJD.UI.ButtonCommand and AJD.UI.ButtonCommand(arg) or AJD.HandleButtonCommand(arg)) - return - end - - if isAlias("minimap", cmd) then - local mm = (rest or ""):match("^(%S+)") - local normalized = asciiLower(rest or "") - if mm and mm ~= "" then - local token = mm - if isAlias("mm_hide", token) then normalized = "hide" - elseif isAlias("mm_show", token) then normalized = "show" - elseif isAlias("mm_lock", token) then normalized = "lock" - elseif isAlias("mm_unlock", token) then normalized = "unlock" - elseif isAlias("mm_reset", token) then normalized = "reset" - elseif isAlias("mm_pos", token) then normalized = "pos" - end - end - (AJD.Minimap and AJD.Minimap.Command and AJD.Minimap.Command(normalized) or AJD.HandleMinimapCommand(normalized)) - return - end - - if isAlias("toggle", cmd) then - (AJD.UI and AJD.UI.TogglePopup and AJD.UI.TogglePopup() or AJD.TogglePopup()) - return - end - - AJD.PrintHelp() -end diff --git a/Core.lua b/Core.lua deleted file mode 100644 index 771b147..0000000 --- a/Core.lua +++ /dev/null @@ -1,27 +0,0 @@ --- File: Core.lua --- Core namespace/wiring for AutoJunkDestroyer runtime. - -local AJD = _G.AutoJunkDestroyerRuntime or {} -AJD.Core = AJD.Core or {} - -function AJD.Core.IsDisabledNow() - return AJD.IsDisabledNow and AJD.IsDisabledNow() or false -end - -function AJD.Core.TogglePause() - if AJD.TogglePause then - AJD.TogglePause() - end -end - -function AJD.Core.Resume() - if AJD.Resume then - AJD.Resume() - end -end - -function AJD.Core.PrintStatus() - if AJD.PrintStatus then - AJD.PrintStatus() - end -end diff --git a/Migration.lua b/Migration.lua deleted file mode 100644 index f229e66..0000000 --- a/Migration.lua +++ /dev/null @@ -1,5 +0,0 @@ --- File: Migration.lua --- Migration namespace placeholder for SavedVariables/AceDB migration hooks. - -local AJD = _G.AutoJunkDestroyerRuntime or {} -AJD.Migration = AJD.Migration or {} diff --git a/Minimap.lua b/Minimap.lua deleted file mode 100644 index 27e12ac..0000000 --- a/Minimap.lua +++ /dev/null @@ -1,11 +0,0 @@ --- File: Minimap.lua --- Minimap namespace/wiring for AutoJunkDestroyer runtime. - -local AJD = _G.AutoJunkDestroyerRuntime or {} -AJD.Minimap = AJD.Minimap or {} - -function AJD.Minimap.Command(arg) - if AJD.HandleMinimapCommand then - AJD.HandleMinimapCommand(arg) - end -end diff --git a/README.md b/README.md index 71dc6d5..c8379c1 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,6 @@ AutoJunkDestroyer adds a simple button to delete grey (junk) items on demand, pl - If there are many, it may ask you to click again to continue. - Minimap icon tooltip shows controls. -## Slash commands -- `/ajd threshold ` — set bag fullness threshold (e.g. `90` or `0.90`). -- `/ajd minimap hide|show|lock|unlock|reset` -- `/ajd pause` — toggle pause state -- `/ajd resume` — explicitly resume -- `/ajd status` — print current runtime state ## Localization This addon is fully localized for these client locales: @@ -43,5 +37,3 @@ Bundled (embedded) libraries: - **Full localization**: enUS, deDE, frFR, esES, esMX, itIT, ptBR, ruRU, koKR, zhCN, zhTW -## Localized command aliases -- Non-English locales can use localized aliases for slash subcommands (for example `/ajd 상태`, `/ajd 状态`, `/ajd статус`) in addition to English tokens. diff --git a/Shard.lua b/Shard.lua deleted file mode 100644 index 7179956..0000000 --- a/Shard.lua +++ /dev/null @@ -1,5 +0,0 @@ --- File: Shard.lua --- Shard namespace placeholder for shard-specific runtime hooks. - -local AJD = _G.AutoJunkDestroyerRuntime or {} -AJD.Shard = AJD.Shard or {} diff --git a/UI.lua b/UI.lua deleted file mode 100644 index ab04f12..0000000 --- a/UI.lua +++ /dev/null @@ -1,17 +0,0 @@ --- File: UI.lua --- UI namespace/wiring for AutoJunkDestroyer runtime. - -local AJD = _G.AutoJunkDestroyerRuntime or {} -AJD.UI = AJD.UI or {} - -function AJD.UI.TogglePopup() - if AJD.TogglePopup then - AJD.TogglePopup() - end -end - -function AJD.UI.ButtonCommand(arg) - if AJD.HandleButtonCommand then - AJD.HandleButtonCommand(arg) - end -end diff --git a/scripts/check_lua_syntax.sh b/scripts/check_lua_syntax.sh index 287513e..2e8ab3d 100755 --- a/scripts/check_lua_syntax.sh +++ b/scripts/check_lua_syntax.sh @@ -6,7 +6,7 @@ if ! command -v luac >/dev/null 2>&1; then exit 1 fi -files=(AutoJunkDestroyer.lua Migration.lua Core.lua UI.lua Minimap.lua Shard.lua Commands.lua) +files=(AutoJunkDestroyer.lua) while IFS= read -r f; do files+=("$f") done < <(find Locales -maxdepth 1 -type f -name '*.lua' | sort)