From 289f0956bfc2db7c2efa5fc97fe0e464ad210dc2 Mon Sep 17 00:00:00 2001 From: rilgamon Date: Thu, 4 Mar 2021 23:57:58 +0100 Subject: [PATCH] Moved to linux --- README.md | 18 +- core.lua | 626 +++++++++++++++++++++--------------------- license.txt | 10 +- locale_deDE.lua | 52 ++-- locale_enUS.lua | 52 ++-- pack.xml | 8 +- zz_GarrisonToggle.toc | 4 +- 7 files changed, 385 insertions(+), 385 deletions(-) mode change 100644 => 100755 README.md mode change 100644 => 100755 core.lua mode change 100644 => 100755 license.txt mode change 100644 => 100755 locale_deDE.lua mode change 100644 => 100755 locale_enUS.lua mode change 100644 => 100755 pack.xml mode change 100644 => 100755 zz_GarrisonToggle.toc diff --git a/README.md b/README.md old mode 100644 new mode 100755 index bf2ed4a..1e105b6 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# zz_GarrisonToggle - -Simple LDB for Garrison windows toggle. -This can be usefull if you're not using the original map. - -Shift-Click will switch through the garrisons (Pandaria, Legion, BfA) -Leftclick opens the selected Garrison Landing Page. - -#### Links +# zz_GarrisonToggle + +Simple LDB for Garrison windows toggle. +This can be usefull if you're not using the original map. + +Shift-Click will switch through the garrisons (Pandaria, Legion, BfA) +Leftclick opens the selected Garrison Landing Page. + +#### Links [Releases](https://git.grml.de/rilgamon/zz_GarrisonToggle/releases "Releases") | [Source](https://git.grml.de/rilgamon/zz_GarrisonToggle "Source") | [Bugs&Comments](https://git.grml.de/rilgamon/zz_GarrisonToggle/issues "Bugs&Comments") | [Donate](https://liberapay.com/bundesloser "Donate") | [Contact](https://mastodon.grml.de/@robin "Contact") \ No newline at end of file diff --git a/core.lua b/core.lua old mode 100644 new mode 100755 index 4db4358..129d6d6 --- a/core.lua +++ b/core.lua @@ -1,314 +1,314 @@ -local name, addon = ... -local parentName = addon['parentName'] or "BrokerPack" -local childName = "zz_GarrisonToggle" -local realm = GetRealmName() -local player = UnitName('player').."-"..realm -local defaults = { - ['garrisonText'] = 'GS', - ['garrisonHideCombat'] = false, - ['hideStandard'] = true, -} - -local options = { -} -local L = LibStub("AceLocale-3.0"):GetLocale(childName, true) -local db -local GBM = Enum.GarrisonFollowerType.FollowerType_8_0 -local function OnText(message) - addon:OnText(childName, message) -end -local function switchDisplay(value) - if(value) then - AlertFrame:UnregisterEvent("GARRISON_MISSION_FINISHED") - AlertFrame:UnregisterEvent("GARRISON_BUILDING_ACTIVATABLE") - else - AlertFrame:RegisterEvent("GARRISON_MISSION_FINISHED") - AlertFrame:RegisterEvent("GARRISON_BUILDING_ACTIVATABLE") - end -end -local function getPref(pref) - return db[pref[#pref]] -end - -local function setPref(pref,value) - if(pref[#pref] == "garrisonText" and value=="") then - value = nil - elseif(pref[#pref] == "garrisonHideCombat") then - switchDisplay(value) - end - db[pref[#pref]] = value - OnText(db['garrisonText'] or GARRISON_LOCATION_TOOLTIP) -end - -local gtypes = {} -local function ResetGBM() - for k,v in pairs(gtypes) do - local l = C_Garrison.GetGarrisonInfo(v) - if(l and l>0) then - GBM = k - db['GBM'] = GBM - GarrisonLandingPage.garrTypeID = gtypes[GBM] - break - end - end -end -local function findTypes() - for k, v in pairs(Enum.GarrisonType) do - local l = C_Garrison.GetGarrisonInfo(v) - if(l and tonumber(l)>0) then - local _, ver, subver = strsplit('_', k) - local followerType = Enum.GarrisonFollowerType[format('FollowerType_%i_%i',ver, subver)] - if(followerType) then - db['missions'][player][followerType] = db['missions'][player][followerType] or {} - gtypes[followerType] = v - end - end - end - if(not gtypes[GBM]) then - ResetGBM() - end -end -local function bclick(swap) - if(GarrisonLandingPage) then - if(GarrisonLandingPage:IsShown()) then - GarrisonLandingPage_Toggle() - if(not swap) then - return - end - end - GarrisonLandingPage.garrTypeID = gtypes[GBM] - if(not GarrisonLandingPage.garrTypeID) then - ResetGBM() - findTypes() - if(not GarrisonLandingPage.garrTypeID) then --- print("still no garrType") - GarrisonLandingPage_Toggle() - return - end - end - if (C_Garrison.GetGarrisonInfo(GarrisonLandingPage.garrTypeID)) then - ShowGarrisonLandingPage(gtypes[GBM]) - GarrisonLandingPageReportList_OnShow(GarrisonLandingPage) - C_Garrison.RequestLandingPageShipmentInfo() - if ( not GarrisonLandingPageReport.selectedTab ) then - GarrisonLandingPageReport.unselectedTab = GarrisonLandingPageReport.InProgress - GarrisonLandingPageReport.selectedTab = GarrisonLandingPageReport.Available - GarrisonLandingPageReport_SetTab(GarrisonLandingPageReport.unselectedTab) - else - GarrisonLandingPageReportList_UpdateItems() - end - else - ResetGBM() - end - end -end -local function OnButton(self,button) - local level = C_Garrison.GetGarrisonInfo(C_Garrison.GetLandingPageGarrisonType()) - if(tonumber(level) and tonumber(level)<1) then - ResetGBM() - end - if(button=="LeftButton") then - if(IsShiftKeyDown()) then - findTypes() - local k = 0 - local picknext = nil - for a,b in pairs(gtypes) do - local level = C_Garrison.GetGarrisonInfo(b) - if(level and level > 0) then - if(picknext) then - k = a - break - end - if(GBM == a) then - picknext = true - end - - end - end - if(k==0) then - ResetGBM() - else - GBM = k - db['GBM'] = GBM - end - bclick(true) - else - bclick() - end - elseif(button=="RightButton") then - if(InterfaceOptionsFrame:IsVisible() and not InCombatLockdown()) then - InterfaceOptionsFrame:Hide() - else - InterfaceOptionsFrame_OpenToCategory(childName) - InterfaceOptionsFrame_OpenToCategory(childName) -- Call it twice because auf WoW-Bug - end - end -end - -local function IsInProgress(mid) - for k,v in pairs(C_Garrison.GetInProgressMissions(GBM) or {}) do - if(tonumber(v['missionID'])==tonumber(mid)) then - return true - end - end - return false -end - -local function GetMission(missionID) - for k,v in pairs(C_Garrison.GetInProgressMissions(GBM) or {}) do - if(missionID==v['missionID']) then - return v - end - end -end -local function AddDB(missionID) - local missionInfo = GetMission(missionID) - if(missionInfo) then - local mt = {C_Garrison.GetMissionTimes(missionID)} - db['missions'][player][GBM][missionID] = time() + mt[5] - end -end -local function CheckDB(missionID) - local missionInfo = GetMission(missionID) - if(missionInfo and db['missions'][player][GBM]) then - local old = db['missions'][player][GBM][missionID] - local mt = {C_Garrison.GetMissionTimes(missionID)} - db['missions'][player][GBM][missionID] = db['missions'][player][GBM][missionID] or (time() + mt[5]) - if(db['missions'][player][GBM][missionID] ~= old) then --- print("RESET",missionInfo['name']) - end - end -end -local function prune() - if(C_Garrison.GetInProgressMissions and GBM) then - local temp = C_Garrison.GetInProgressMissions(GBM) - if(temp) then - db['missions'][player][GBM] = {} - local ti = time() - for k, v in pairs(temp) do - if(v['missionEndTime']) then - db['missions'][player][GBM][v['missionID']] = v['missionEndTime'] - else - local mt = {C_Garrison.GetMissionTimes(v['missionID'])} - db['missions'][player][GBM][v['missionID']] = ti + mt[5] - end - end - end - end -end -local function tooltipsort(a, b) - return (db['missions'][player][GBM][a['missionID']] or 0) < (db['missions'][player][GBM][b['missionID']] or 0) -end -local function OnTooltipShow(GameTooltip) - GameTooltip:AddLine(childName) - local num = C_Garrison.GetNumFollowers(GBM) - if(GBM and db['missions'][player][GBM]) then - local temp = C_Garrison.GetInProgressMissions(GBM) - local ti = time() - if(temp) then - db['missions'][player][GBM] = {} - for k, v in pairs(temp) do - db['missions'][player][GBM][v['missionID']] = v['missionEndTime'] - end - sort(temp,tooltipsort) - for k,v in pairs(temp) do - -- CheckDB(tonumber(v['missionID'])) - GameTooltip:AddDoubleLine(v['name'],db['missions'][player][GBM][tonumber(v['missionID'])]>ti and v['timeLeft'] or addon:colorize("Done","00ff00")) - num = num - v['numFollowers'] - end - end - for k, v in pairs(db['missions']) do - if(k ~= player and v[GBM]) then - for a,b in pairs(v[GBM]) do - if(b=ti) then - local r = b - ti - if(r0) then - GameTooltip:AddDoubleLine(k, addon:colorize(L['next'](found),"ffff00")) - end - end - end - end - local nr = C_Garrison.GetInProgressMissions(GBM) - local nr2 = C_Garrison.GetAvailableMissions(GBM) - if(GBM == 123) then - if(C_ArdenwealdGardening.IsGardenAccessible()) then - local data = C_ArdenwealdGardening.GetGardenData() - if(data and data['ready'] and data['ready']>0) then - GameTooltip:AddLine(addon:colorize(L['ArdenwealdGardening_attention'](data['ready']),'00ff00')) - end - end - end - if(num>0) then - GameTooltip:AddDoubleLine(addon:colorize(L["Follower:"],"ffffff"),num.."/"..C_Garrison.GetNumFollowers(GBM)) - end - if(nr and nr2) then - GameTooltip:AddDoubleLine(addon:colorize(L["Missions:"],"ffffff"),#nr.."/"..#nr2) - end - else - GameTooltip:AddLine(L["No garrison found!"]) - end - GameTooltip:AddLine(addon:colorize(L["SHIFT LEFTCLICK toggles Garrison"],"00ff00")) - GameTooltip:AddLine(addon:colorize(L["Press SHIFT for other characters info"],"00ff00")) -end -local function event(self,event,missionID,...) - if(event == "GARRISON_MISSION_COMPLETE_RESPONSE") then - local canComplete, succeeded = ... - if(canComplete) then --- db['missions'][player][GBM][missionID] = nil - end - elseif(event == "GARRISON_MISSION_STARTED") then - AddDB(missionID) - elseif(event == "ADDON_LOADED") then - if(missionID == 'Blizzard_GarrisonUI') then - findTypes() - self:UnregisterEvent(event) - end - return - end - prune() -end -local function init() - db = addon['db']['profile'][childName] - db['missions'] = db['missions'] or {} - db['missions'][player] = db['missions'][player] or {} - options = addon:InitConfig(childName, true, { - ['type'] = "launcher", - ['OnClick'] = OnButton, - ['text'] = db['garrisonText'] or GARRISON_LOCATION_TOOLTIP, - ['OnTooltipShow'] = OnTooltipShow, - ['icon'] = "Interface\\Icons\\Achievement_Arena_2v2_6", - }, getPref, setPref) - addon:AddConfigEntry(childName,'toggle','garrisonHideCombat',L["Hide Alert"],L["Hide mission complete alert"],1,nil,nil,nil,nil) - addon:AddConfigEntry(childName,'toggle','hideStandard',L["Hide Blizzard"],L["Hide Blizzards default garrison button"],1,nil,nil,nil,nil) - addon:AddConfigEntry(childName,'input','garrisonText',L["Display Text"],L["Display Text description"],1,nil,nil,nil,nil) - addon:RegisterFunc({"ADDON_LOADED","GARRISON_MISSION_STARTED","GARRISON_MISSION_FINISHED","GARRISON_MISSION_COMPLETE_RESPONSE","PLAYER_LOGOUT"},"OnEvent", event) - db['GBM'] = db['GBM'] or Enum.GarrisonFollowerType.FollowerType_8_0 - GBM = db['GBM'] - if(not IsAddOnLoaded("Blizzard_GarrisonUI")) then - UIParentLoadAddOn("Blizzard_GarrisonUI") - end - if(db['hideStandard']) then - GarrisonLandingPageMinimapButton:UnregisterAllEvents() - GarrisonLandingPageMinimapButton:Hide() - end - - switchDisplay(db['garrisonHideCombat']) -end +local name, addon = ... +local parentName = addon['parentName'] or "BrokerPack" +local childName = "zz_GarrisonToggle" +local realm = GetRealmName() +local player = UnitName('player').."-"..realm +local defaults = { + ['garrisonText'] = 'GS', + ['garrisonHideCombat'] = false, + ['hideStandard'] = true, +} + +local options = { +} +local L = LibStub("AceLocale-3.0"):GetLocale(childName, true) +local db +local GBM = Enum.GarrisonFollowerType.FollowerType_8_0 +local function OnText(message) + addon:OnText(childName, message) +end +local function switchDisplay(value) + if(value) then + AlertFrame:UnregisterEvent("GARRISON_MISSION_FINISHED") + AlertFrame:UnregisterEvent("GARRISON_BUILDING_ACTIVATABLE") + else + AlertFrame:RegisterEvent("GARRISON_MISSION_FINISHED") + AlertFrame:RegisterEvent("GARRISON_BUILDING_ACTIVATABLE") + end +end +local function getPref(pref) + return db[pref[#pref]] +end + +local function setPref(pref,value) + if(pref[#pref] == "garrisonText" and value=="") then + value = nil + elseif(pref[#pref] == "garrisonHideCombat") then + switchDisplay(value) + end + db[pref[#pref]] = value + OnText(db['garrisonText'] or GARRISON_LOCATION_TOOLTIP) +end + +local gtypes = {} +local function ResetGBM() + for k,v in pairs(gtypes) do + local l = C_Garrison.GetGarrisonInfo(v) + if(l and l>0) then + GBM = k + db['GBM'] = GBM + GarrisonLandingPage.garrTypeID = gtypes[GBM] + break + end + end +end +local function findTypes() + for k, v in pairs(Enum.GarrisonType) do + local l = C_Garrison.GetGarrisonInfo(v) + if(l and tonumber(l)>0) then + local _, ver, subver = strsplit('_', k) + local followerType = Enum.GarrisonFollowerType[format('FollowerType_%i_%i',ver, subver)] + if(followerType) then + db['missions'][player][followerType] = db['missions'][player][followerType] or {} + gtypes[followerType] = v + end + end + end + if(not gtypes[GBM]) then + ResetGBM() + end +end +local function bclick(swap) + if(GarrisonLandingPage) then + if(GarrisonLandingPage:IsShown()) then + GarrisonLandingPage_Toggle() + if(not swap) then + return + end + end + GarrisonLandingPage.garrTypeID = gtypes[GBM] + if(not GarrisonLandingPage.garrTypeID) then + ResetGBM() + findTypes() + if(not GarrisonLandingPage.garrTypeID) then +-- print("still no garrType") + GarrisonLandingPage_Toggle() + return + end + end + if (C_Garrison.GetGarrisonInfo(GarrisonLandingPage.garrTypeID)) then + ShowGarrisonLandingPage(gtypes[GBM]) + GarrisonLandingPageReportList_OnShow(GarrisonLandingPage) + C_Garrison.RequestLandingPageShipmentInfo() + if ( not GarrisonLandingPageReport.selectedTab ) then + GarrisonLandingPageReport.unselectedTab = GarrisonLandingPageReport.InProgress + GarrisonLandingPageReport.selectedTab = GarrisonLandingPageReport.Available + GarrisonLandingPageReport_SetTab(GarrisonLandingPageReport.unselectedTab) + else + GarrisonLandingPageReportList_UpdateItems() + end + else + ResetGBM() + end + end +end +local function OnButton(self,button) + local level = C_Garrison.GetGarrisonInfo(C_Garrison.GetLandingPageGarrisonType()) + if(tonumber(level) and tonumber(level)<1) then + ResetGBM() + end + if(button=="LeftButton") then + if(IsShiftKeyDown()) then + findTypes() + local k = 0 + local picknext = nil + for a,b in pairs(gtypes) do + local level = C_Garrison.GetGarrisonInfo(b) + if(level and level > 0) then + if(picknext) then + k = a + break + end + if(GBM == a) then + picknext = true + end + + end + end + if(k==0) then + ResetGBM() + else + GBM = k + db['GBM'] = GBM + end + bclick(true) + else + bclick() + end + elseif(button=="RightButton") then + if(InterfaceOptionsFrame:IsVisible() and not InCombatLockdown()) then + InterfaceOptionsFrame:Hide() + else + InterfaceOptionsFrame_OpenToCategory(childName) + InterfaceOptionsFrame_OpenToCategory(childName) -- Call it twice because auf WoW-Bug + end + end +end + +local function IsInProgress(mid) + for k,v in pairs(C_Garrison.GetInProgressMissions(GBM) or {}) do + if(tonumber(v['missionID'])==tonumber(mid)) then + return true + end + end + return false +end + +local function GetMission(missionID) + for k,v in pairs(C_Garrison.GetInProgressMissions(GBM) or {}) do + if(missionID==v['missionID']) then + return v + end + end +end +local function AddDB(missionID) + local missionInfo = GetMission(missionID) + if(missionInfo) then + local mt = {C_Garrison.GetMissionTimes(missionID)} + db['missions'][player][GBM][missionID] = time() + mt[5] + end +end +local function CheckDB(missionID) + local missionInfo = GetMission(missionID) + if(missionInfo and db['missions'][player][GBM]) then + local old = db['missions'][player][GBM][missionID] + local mt = {C_Garrison.GetMissionTimes(missionID)} + db['missions'][player][GBM][missionID] = db['missions'][player][GBM][missionID] or (time() + mt[5]) + if(db['missions'][player][GBM][missionID] ~= old) then +-- print("RESET",missionInfo['name']) + end + end +end +local function prune() + if(C_Garrison.GetInProgressMissions and GBM) then + local temp = C_Garrison.GetInProgressMissions(GBM) + if(temp) then + db['missions'][player][GBM] = {} + local ti = time() + for k, v in pairs(temp) do + if(v['missionEndTime']) then + db['missions'][player][GBM][v['missionID']] = v['missionEndTime'] + else + local mt = {C_Garrison.GetMissionTimes(v['missionID'])} + db['missions'][player][GBM][v['missionID']] = ti + mt[5] + end + end + end + end +end +local function tooltipsort(a, b) + return (db['missions'][player][GBM][a['missionID']] or 0) < (db['missions'][player][GBM][b['missionID']] or 0) +end +local function OnTooltipShow(GameTooltip) + GameTooltip:AddLine(childName) + local num = C_Garrison.GetNumFollowers(GBM) + if(GBM and db['missions'][player][GBM]) then + local temp = C_Garrison.GetInProgressMissions(GBM) + local ti = time() + if(temp) then + db['missions'][player][GBM] = {} + for k, v in pairs(temp) do + db['missions'][player][GBM][v['missionID']] = v['missionEndTime'] + end + sort(temp,tooltipsort) + for k,v in pairs(temp) do + -- CheckDB(tonumber(v['missionID'])) + GameTooltip:AddDoubleLine(v['name'],db['missions'][player][GBM][tonumber(v['missionID'])]>ti and v['timeLeft'] or addon:colorize("Done","00ff00")) + num = num - v['numFollowers'] + end + end + for k, v in pairs(db['missions']) do + if(k ~= player and v[GBM]) then + for a,b in pairs(v[GBM]) do + if(b=ti) then + local r = b - ti + if(r0) then + GameTooltip:AddDoubleLine(k, addon:colorize(L['next'](found),"ffff00")) + end + end + end + end + local nr = C_Garrison.GetInProgressMissions(GBM) + local nr2 = C_Garrison.GetAvailableMissions(GBM) + if(GBM == 123) then + if(C_ArdenwealdGardening.IsGardenAccessible()) then + local data = C_ArdenwealdGardening.GetGardenData() + if(data and data['ready'] and data['ready']>0) then + GameTooltip:AddLine(addon:colorize(L['ArdenwealdGardening_attention'](data['ready']),'00ff00')) + end + end + end + if(num>0) then + GameTooltip:AddDoubleLine(addon:colorize(L["Follower:"],"ffffff"),num.."/"..C_Garrison.GetNumFollowers(GBM)) + end + if(nr and nr2) then + GameTooltip:AddDoubleLine(addon:colorize(L["Missions:"],"ffffff"),#nr.."/"..#nr2) + end + else + GameTooltip:AddLine(L["No garrison found!"]) + end + GameTooltip:AddLine(addon:colorize(L["SHIFT LEFTCLICK toggles Garrison"],"00ff00")) + GameTooltip:AddLine(addon:colorize(L["Press SHIFT for other characters info"],"00ff00")) +end +local function event(self,event,missionID,...) + if(event == "GARRISON_MISSION_COMPLETE_RESPONSE") then + local canComplete, succeeded = ... + if(canComplete) then +-- db['missions'][player][GBM][missionID] = nil + end + elseif(event == "GARRISON_MISSION_STARTED") then + AddDB(missionID) + elseif(event == "ADDON_LOADED") then + if(missionID == 'Blizzard_GarrisonUI') then + findTypes() + self:UnregisterEvent(event) + end + return + end + prune() +end +local function init() + db = addon['db']['profile'][childName] + db['missions'] = db['missions'] or {} + db['missions'][player] = db['missions'][player] or {} + options = addon:InitConfig(childName, true, { + ['type'] = "launcher", + ['OnClick'] = OnButton, + ['text'] = db['garrisonText'] or GARRISON_LOCATION_TOOLTIP, + ['OnTooltipShow'] = OnTooltipShow, + ['icon'] = "Interface\\Icons\\Achievement_Arena_2v2_6", + }, getPref, setPref) + addon:AddConfigEntry(childName,'toggle','garrisonHideCombat',L["Hide Alert"],L["Hide mission complete alert"],1,nil,nil,nil,nil) + addon:AddConfigEntry(childName,'toggle','hideStandard',L["Hide Blizzard"],L["Hide Blizzards default garrison button"],1,nil,nil,nil,nil) + addon:AddConfigEntry(childName,'input','garrisonText',L["Display Text"],L["Display Text description"],1,nil,nil,nil,nil) + addon:RegisterFunc({"ADDON_LOADED","GARRISON_MISSION_STARTED","GARRISON_MISSION_FINISHED","GARRISON_MISSION_COMPLETE_RESPONSE","PLAYER_LOGOUT"},"OnEvent", event) + db['GBM'] = db['GBM'] or Enum.GarrisonFollowerType.FollowerType_8_0 + GBM = db['GBM'] + if(not IsAddOnLoaded("Blizzard_GarrisonUI")) then + UIParentLoadAddOn("Blizzard_GarrisonUI") + end + if(db['hideStandard']) then + GarrisonLandingPageMinimapButton:UnregisterAllEvents() + GarrisonLandingPageMinimapButton:Hide() + end + + switchDisplay(db['garrisonHideCombat']) +end addon:startup(name, childName, init, true, defaults) \ No newline at end of file diff --git a/license.txt b/license.txt old mode 100644 new mode 100755 index 6d2e364..92a5308 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ -The following license excludes the libraries (Libs) included. See the libraries directory or website. - -This AddOn is public domain. That means you can change it, rename it or paint it yellow. -My name (Rilgamon) is valid only for WoWInterface.com and curse.com. -If you use/offer this addon on another website please remove my name. +The following license excludes the libraries (Libs) included. See the libraries directory or website. + +This AddOn is public domain. That means you can change it, rename it or paint it yellow. +My name (Rilgamon) is valid only for WoWInterface.com and curse.com. +If you use/offer this addon on another website please remove my name. If you want to give me credit you can replace it with a link to my profile on WoWInterface.com. \ No newline at end of file diff --git a/locale_deDE.lua b/locale_deDE.lua old mode 100644 new mode 100755 index eb9ef05..a6664f3 --- a/locale_deDE.lua +++ b/locale_deDE.lua @@ -1,27 +1,27 @@ -local addonname, addon = ... -local name = "zz_GarrisonToggle" -local L = LibStub("AceLocale-3.0"):NewLocale(name, "deDE", false) -if L then - L[name] = name - L[name..' Settings'] = name..' Einstellungen' - L["Mission done"] = "Mission erledigt" - L['next'] = function(minutes) return format("N\195\164chste %.1f Min",minutes / 60 ) end - L['ArdenwealdGardening_attention'] = function(ready) return format("Aufmerksamkeit erw\195\188nscht im Garten. (%ix)",ready) end - L["Follower:"] = "Abenteurer:" - L["Missions:"] = "Missionen:" - L["No garrison found!"] = "Keine Garnison gefunden!" - L["SHIFT LEFTCLICK toggles Garrison"] = "SHIFT LINKSCLICK schaltet durch die Garnisonen" - L["Press SHIFT for other characters info"] = "SHIFT zeigt andere Charactere" - L["Hide Alert"] = "Verstecke Missionsmeldung" - L["Hide mission complete alert"] = "Unterdr\195\188ckt Missionsmeldung" - L["Hide Blizzard"] = "Verstecke Blizzard" - L["Hide Blizzards default garrison button"] = "Versteckt den Garnisonsknopf an der Minimap" - L["Display Text"] = "Anzeigetext" - L["Display Text description"] = "Text, der neben dem Icon angezeigt wird." -end - --- ö \195\182 ß \195\159 --- ü \195\188 ä \195\164 --- Ä \195\132 --- ö \195\182 +local addonname, addon = ... +local name = "zz_GarrisonToggle" +local L = LibStub("AceLocale-3.0"):NewLocale(name, "deDE", false) +if L then + L[name] = name + L[name..' Settings'] = name..' Einstellungen' + L["Mission done"] = "Mission erledigt" + L['next'] = function(minutes) return format("N\195\164chste %.1f Min",minutes / 60 ) end + L['ArdenwealdGardening_attention'] = function(ready) return format("Aufmerksamkeit erw\195\188nscht im Garten. (%ix)",ready) end + L["Follower:"] = "Abenteurer:" + L["Missions:"] = "Missionen:" + L["No garrison found!"] = "Keine Garnison gefunden!" + L["SHIFT LEFTCLICK toggles Garrison"] = "SHIFT LINKSCLICK schaltet durch die Garnisonen" + L["Press SHIFT for other characters info"] = "SHIFT zeigt andere Charactere" + L["Hide Alert"] = "Verstecke Missionsmeldung" + L["Hide mission complete alert"] = "Unterdr\195\188ckt Missionsmeldung" + L["Hide Blizzard"] = "Verstecke Blizzard" + L["Hide Blizzards default garrison button"] = "Versteckt den Garnisonsknopf an der Minimap" + L["Display Text"] = "Anzeigetext" + L["Display Text description"] = "Text, der neben dem Icon angezeigt wird." +end + +-- ö \195\182 ß \195\159 +-- ü \195\188 ä \195\164 +-- Ä \195\132 +-- ö \195\182 -- Ü \195\156 \ No newline at end of file diff --git a/locale_enUS.lua b/locale_enUS.lua old mode 100644 new mode 100755 index 069725d..bf31bf0 --- a/locale_enUS.lua +++ b/locale_enUS.lua @@ -1,27 +1,27 @@ -local addonname, addon = ... -local name = "zz_GarrisonToggle" -local L = LibStub("AceLocale-3.0"):NewLocale(name, "enUS", true) -if L then - L[name] = name - L[name..' Settings'] = name..' Einstellungen' - L["Mission done"] = true - L['next'] = function(minutes) return format("Next %.1f Min",minutes / 60 ) end - L['ArdenwealdGardening_attention'] = function(ready) return format("Attention needed in your garden. (%ix)",ready) end - L["Follower:"] = true - L["Missions:"] = true - L["No garrison found!"] = true - L["SHIFT LEFTCLICK toggles Garrison"] = true - L["Press SHIFT for other characters info"] = true - L["Hide Alert"] = true - L["Hide mission complete alert"] = true - L["Hide Blizzard"] = true - L["Hide Blizzards default garrison button"] = true - L["Display Text"] = true - L["Display Text description"] = "Default text displayed next to icon" -end - --- ö \195\182 ß \195\159 --- ü \195\188 ä \195\164 --- Ä \195\132 --- ö \195\182 +local addonname, addon = ... +local name = "zz_GarrisonToggle" +local L = LibStub("AceLocale-3.0"):NewLocale(name, "enUS", true) +if L then + L[name] = name + L[name..' Settings'] = name..' Einstellungen' + L["Mission done"] = true + L['next'] = function(minutes) return format("Next %.1f Min",minutes / 60 ) end + L['ArdenwealdGardening_attention'] = function(ready) return format("Attention needed in your garden. (%ix)",ready) end + L["Follower:"] = true + L["Missions:"] = true + L["No garrison found!"] = true + L["SHIFT LEFTCLICK toggles Garrison"] = true + L["Press SHIFT for other characters info"] = true + L["Hide Alert"] = true + L["Hide mission complete alert"] = true + L["Hide Blizzard"] = true + L["Hide Blizzards default garrison button"] = true + L["Display Text"] = true + L["Display Text description"] = "Default text displayed next to icon" +end + +-- ö \195\182 ß \195\159 +-- ü \195\188 ä \195\164 +-- Ä \195\132 +-- ö \195\182 -- Ü \195\156 \ No newline at end of file diff --git a/pack.xml b/pack.xml old mode 100644 new mode 100755 index 8367b95..767aaa5 --- a/pack.xml +++ b/pack.xml @@ -1,5 +1,5 @@ - -