From c959e8ee971f1122dbf0e2acff94ecf8463d307c Mon Sep 17 00:00:00 2001 From: Kenneth-Audenaert Date: Tue, 24 Mar 2026 22:37:38 +0100 Subject: [PATCH 1/2] Support "always" interaction mode for quest translations Make UpdateQuestTranslationFrame global so language packs can trigger it from events/hooks. Skip the IsMouseOver() check when the interaction mode is set to "always", and prevent OnLeave from hiding the translation frame in that mode. This enables language packs (e.g. MultiLanguage_NL) to register an "always show" interaction option that displays quest translations without requiring hover, while leaving existing hover/hotkey behavior completely unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) --- MultiLanguage.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/MultiLanguage.lua b/MultiLanguage.lua index 26146e9..67505e0 100755 --- a/MultiLanguage.lua +++ b/MultiLanguage.lua @@ -233,8 +233,9 @@ local function SetQuestDetails(headerText, objectiveText, descriptionHeader, des ) end -local function UpdateQuestTranslationFrame() - if QuestMapDetailsScrollFrame:IsShown() and QuestMapDetailsScrollFrame:IsMouseOver() then +function UpdateQuestTranslationFrame() + local isAlways = MultiLanguageOptions and MultiLanguageOptions.SELECTED_INTERACTION == "always" + if QuestMapDetailsScrollFrame:IsShown() and (isAlways or QuestMapDetailsScrollFrame:IsMouseOver()) then local questID = C_QuestLog.GetSelectedQuest() if not questID then @@ -268,7 +269,7 @@ local function UpdateQuestTranslationFrame() ) end - if QuestFrame:IsShown() and QuestFrame:IsMouseOver() then + if QuestFrame:IsShown() and (isAlways or QuestFrame:IsMouseOver()) then local questID = GetQuestID() if not questID then @@ -345,7 +346,9 @@ local function SetQuestHoverScripts(frame, children) end) frame:SetScript("OnLeave", function() - QuestTranslationFrame:Hide() + if not (MultiLanguageOptions and MultiLanguageOptions.SELECTED_INTERACTION == "always") then + QuestTranslationFrame:Hide() + end questFrameBeingHovered = false end) From 546b201202a32d077cb317525b116c125f77ac55 Mon Sep 17 00:00:00 2001 From: Kenneth-Audenaert Date: Tue, 31 Mar 2026 23:18:25 +0200 Subject: [PATCH 2/2] Add complete "always show" interaction mode to core addon Move the "always show" feature entirely into the core addon so it works for all users without requiring a language pack. Adds translated labels for all 10 supported languages, registers the option in defaults, and handles QUEST_LOG_UPDATE and QuestMapDetailsScrollFrame show/hide events. Co-Authored-By: Claude Opus 4.6 (1M context) --- Frames/MultiLanguageOptionsFrame.lua | 3 ++- Localization/Translations.lua | 30 ++++++++++++++++++---------- MultiLanguage.lua | 26 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/Frames/MultiLanguageOptionsFrame.lua b/Frames/MultiLanguageOptionsFrame.lua index 67b02fe..cf5db97 100755 --- a/Frames/MultiLanguageOptionsFrame.lua +++ b/Frames/MultiLanguageOptionsFrame.lua @@ -143,7 +143,8 @@ local function getDefaultOptions(optionsTranslations) SELECTED_INTERACTION = 'hover', AVAILABLE_INTERACTIONS = { {value = 'hover', text = optionsTranslations["interactionModes"]["hover"]}, - {value = 'hover-hotkey', optionsTranslations["interactionModes"]["hoverHotkey"]} + {value = 'hover-hotkey', optionsTranslations["interactionModes"]["hoverHotkey"]}, + {value = 'always', text = optionsTranslations["interactionModes"]["always"]} }, SELECTED_HOTKEY = nil } diff --git a/Localization/Translations.lua b/Localization/Translations.lua index 95739a9..a7f92db 100644 --- a/Localization/Translations.lua +++ b/Localization/Translations.lua @@ -36,7 +36,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "Hover", - ["hover-hotkey"] = "Hover + hotkey" + ["hover-hotkey"] = "Hover + hotkey", + always = "Always show" } } } @@ -73,7 +74,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "Pasar el cursor", - ["hover-hotkey"] = "Pasar el cursor + tecla de acceso rápido" + ["hover-hotkey"] = "Pasar el cursor + tecla de acceso rápido", + always = "Mostrar siempre" } } } @@ -109,7 +111,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "Hover", - ["hover-hotkey"] = "Hover + Hotkey" + ["hover-hotkey"] = "Hover + Hotkey", + always = "Immer anzeigen" } } } @@ -145,7 +148,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "Survol", - ["hover-hotkey"] = "Survol + raccourci clavier" + ["hover-hotkey"] = "Survol + raccourci clavier", + always = "Toujours afficher" } } } @@ -181,7 +185,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "Passar o mouse", - ["hover-hotkey"] = "Passar o mouse + atalho" + ["hover-hotkey"] = "Passar o mouse + atalho", + always = "Mostrar sempre" } } } @@ -217,7 +222,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "Наведение", - ["hover-hotkey"] = "Наведение + горячая клавиша" + ["hover-hotkey"] = "Наведение + горячая клавиша", + always = "Всегда показывать" } } } @@ -253,7 +259,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "悬停", - ["hover-hotkey"] = "悬停 + 快捷键" + ["hover-hotkey"] = "悬停 + 快捷键", + always = "始终显示" } } } @@ -289,7 +296,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "마우스 오버", - ["hover-hotkey"] = "마우스 오버 + 단축키" + ["hover-hotkey"] = "마우스 오버 + 단축키", + always = "항상 표시" } } } @@ -325,7 +333,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "Sostener", - ["hover-hotkey"] = "Sostener + tecla de acceso rápido" + ["hover-hotkey"] = "Sostener + tecla de acceso rápido", + always = "Mostrar siempre" } } } @@ -361,7 +370,8 @@ local function addonLoaded(self, event, addonLoadedName) }, interactionModes = { hover = "懸停", - ["hover-hotkey"] = "懸停 + 快捷鍵" + ["hover-hotkey"] = "懸停 + 快捷鍵", + always = "始終顯示" } } } diff --git a/MultiLanguage.lua b/MultiLanguage.lua index 67505e0..aa87c41 100755 --- a/MultiLanguage.lua +++ b/MultiLanguage.lua @@ -826,3 +826,29 @@ translationFrame:SetPropagateKeyboardInput(true) SetQuestHoverScripts(QuestFrameDetailPanel, true) SetQuestHoverScripts(QuestMapDetailsScrollFrame, false) SetQuestHoverScripts(QuestFrame, false) + +-- "Always show" interaction mode: auto-update quest translations +local alwaysModeFrame = CreateFrame("Frame") +alwaysModeFrame:RegisterEvent("QUEST_LOG_UPDATE") +alwaysModeFrame:SetScript("OnEvent", function() + if MultiLanguageOptions and MultiLanguageOptions.SELECTED_INTERACTION == "always" + and MultiLanguageOptions.QUEST_TRANSLATIONS + and QuestMapDetailsScrollFrame and QuestMapDetailsScrollFrame:IsShown() then + UpdateQuestTranslationFrame() + end +end) + +QuestMapDetailsScrollFrame:HookScript("OnShow", function() + if MultiLanguageOptions and MultiLanguageOptions.SELECTED_INTERACTION == "always" + and MultiLanguageOptions.QUEST_TRANSLATIONS then + C_Timer.After(0.1, function() + UpdateQuestTranslationFrame() + end) + end +end) + +QuestMapDetailsScrollFrame:HookScript("OnHide", function() + if MultiLanguageOptions and MultiLanguageOptions.SELECTED_INTERACTION == "always" then + QuestTranslationFrame:Hide() + end +end)