diff --git a/banker.lua b/banker.lua new file mode 100644 index 0000000..023ef58 --- /dev/null +++ b/banker.lua @@ -0,0 +1,163 @@ +local addonName, addonTable = ... +addonTable['events'] = addonTable['events'] or {} +local db, mailSum, mailRec, player, dbb, dbr, dbf, L, faction, realm +local events = addonTable['events'] +function addonTable:SetupBanker() + player = UnitName('player') + L = addonTable['storage']['L'] + db = addonTable['storage']['db'] + dbr = addonTable['storage']['dbr'] + dbf = addonTable['storage']['dbf'] + dbb = dbf['banker'] + faction = addonTable['storage']['faction'] + realm = addonTable['storage']['realm'] + addonTable['bankHandler'] :SetDB(db[faction]['banker']) +end +local mailframes = {} +local posFrame = CreateFrame("Frame") +posFrame:SetSize(32,1) +posFrame:SetPoint("TOPRIGHT",SendMailFrame,"TOPRIGHT",-10,-12) +posFrame:SetScript("OnEvent", function(self, event, ...) + self:UnregisterEvent('MAIL_FAILED') + self:UnregisterEvent('MAIL_SEND_SUCCESS') + if(event == "MAIL_SEND_SUCCESS") then + if(mailRec and mailSum) then + dbr[mailRec]['incoming'] = (dbr[mailRec]['incoming'] or 0) + mailSum + print(L['Success'](mailRec,mailSum)) + mailframes[mailRec]:Hide() + end + elseif(event == "MAIL_FAILED") then + print(L['Fail']) + end + mailRec = nil + mailSum = nil +end) +local function GetFactionList() + local n,m,_ + local l = {} + if(addonTable['db']['sv']['profileKeys']) then + for k,v in pairs(addonTable['db']['sv']['profileKeys']) do + n,_,m = strsplit(' ',k,3) + if(n) then + if(m == realm) then + if(faction == dbr[n]['faction']) then + l[n] = true + end + end + end + end + end + return l +end +local function getDeliver(name) + if(not dbr[name] or not dbr[name]['currentGold']) then return 0 end + local sendSum,offset + local lim, mon + if(dbb['banker'] ~= player) then + lim = dbb['maxLimit'] or 100 + mon = GetMoney() + sendSum = mon - lim*10000 - 30 + offset = 0 + else + lim = dbb['minLimit'] or 100 + mon = dbr[name]['currentGold'] + sendSum = lim*10000 - mon + offset = 30 + end + if(sendSum + offset > GetMoney()) then + sendSum = GetMoney() + end + return sendSum - (dbb['banker'] == name and 0 or (dbr[name]['incoming'] or 0)) +end +local function Click(self,button) + local sendSum = getDeliver(self['destName']) + if(addonTable:IsTwink(self['destName']) and self['destName']~=player) then + if(sendSum>0) then + if(SetSendMailMoney(sendSum)) then + posFrame:RegisterEvent('MAIL_SEND_SUCCESS') + posFrame:RegisterEvent('MAIL_FAILED') + mailRec = self['destName'] + mailSum = sendSum + SendMail(self['destName'],L['Subject'],nil) + end + end + end +end + +local function Mouse(self) + local tip = GameTooltip + tip:SetOwner(self, "ANCHOR_BOTTOM") + tip:ClearLines() + self['tooltip'] = tip + if(dbb['banker'] ~= player) then + tip:AddLine(format("%s %s",L['Bankier'],dbb['banker'])) + tip:AddLine(format("%s %s",L['Goldgrenze'],dbb['maxLimit'])) + else + tip:AddLine(format("%s %s",L['Empfaenger'],self['destName'])) + tip:AddLine(format("%s %s",L['Goldgrenze'],dbb['minLimit'])) + end + local sendSum = getDeliver(self['destName']) + tip:AddLine(format("%s %s",L['Sende'],GetCoinTextureString(sendSum))) + tip:Show() +end +local function MouseOut(self) + self['tooltip']:Hide() +end +local function MainFrame(name) + if(getDeliver(name)<0) then return nil end + local mailframe = mailframes[name] and mailframes[name] or CreateFrame("Button",nil,SendMailFrame,"ActionButtonTemplate SecureActionButtonTemplate") + mailframe:SetSize(32,32) + mailframe:SetPoint("TOPRIGHT",lastframe,"BOTTOMRIGHT",0,-8) + mailframe:EnableMouse(true) + mailframe:RegisterForClicks("AnyUp") + mailframe['destName'] = name + mailframe:SetScript("OnClick", Click) + mailframe:SetScript("OnEnter", Mouse) + mailframe:SetScript("OnLeave", MouseOut) + if(not mailframe['texture']) then + mailframe['texture'] = mailframe:CreateTexture(nil,"BACKGROUND") + mailframe['texture']:SetTexture("Interface\\Icons\\INV_Misc_Bag_10_Blue") + mailframe['texture']:SetAllPoints(mailframe) + mailframe['texture']:SetPoint("CENTER",0,0) + mailframe['texture']:Show() + end + return mailframe +end +local function buildMailFrames() + local banker = dbb['banker'] + if(banker and mailframes) then + for k,v in pairs(mailframes) do + mailframes[k]:Hide() + mailframes[k] = nil + end + mailframes = {} + end + if(db["disableBanker"]) then return end + posFrame:Show() + lastframe = posFrame + + if(player == banker) then + local fl = GetFactionList() + if(fl) then + local money = GetMoney() + for k,v in pairs(fl) do + if(k ~= banker) then + if(getDeliver(k) > 0 and getDeliver(k) < money - 10000) then + mailframes[k] = MainFrame(k) + mailframes[k]:Show() + lastframe = mailframes[k] + end + end + end + end + else + local money = GetMoney() + if(getDeliver(banker) > 0 and getDeliver(banker) < money - 10000) then + mailframes[banker] = MainFrame(banker) + mailframes[banker]:Show() + end + end +end +function events:MAIL_SHOW() + buildMailFrames() +end diff --git a/broker.lua b/broker.lua new file mode 100644 index 0000000..d635518 --- /dev/null +++ b/broker.lua @@ -0,0 +1,164 @@ +local addonName, addonTable = ... +local childName = "zzMoney2" +local db, dbr, dbp, L, lineIn, lineOut, session, faction, realm +local ldbicon = LibStub:GetLibrary("LibDBIcon-1.0") +function addonTable:SetupBroker() + L = addonTable['storage']['L'] + db = addonTable['storage']['db'] + dbr = addonTable['storage']['dbr'] + dbp = addonTable['storage']['dbp'] + session = addonTable['storage']['session'] + faction = addonTable['storage']['faction'] + realm = addonTable['storage']['realm'] + local folder = addonName ~= childName and format("Interface\\AddOns\\%s\\%s", addonName, childName) or format("Interface\\AddOns\\%s", childName) + lineIn = format("|T%s:0|t %s", format("%s\\in.tga", folder), L['Einnahmen']) + lineOut = format("|T%s:0|t %s", format("%s\\out.tga", folder), L['Ausgaben']) +end +local function cdbCheck(n,realm) + db[realm] = db[realm] or {} + db[realm][n] = db[realm][n] or { currentGold = 0 } +end +local function getSumToday(d) + if(faction=='Neutral') then return 0,0 end + local sumIn,sumOut = 0,0 + d = d or 0 + local day = addonTable:getDateString() + d + for a,b in pairs(dbr['activity'][faction][tostring(day)] or {}) do + if(b < 0) then + sumOut = sumOut + b + else + sumIn = sumIn + b + end + end + return sumOut,sumIn +end +local function getSumWeek() + local sumIn, sumOut = 0,0 + local sumWeekIn, sumWeekOut = 0,0 + for a=0,6 do + sumOut, sumIn = getSumToday(a * -1) + sumWeekIn = sumWeekIn + sumIn + sumWeekOut = sumWeekOut + sumOut + end + return sumWeekOut,sumWeekIn +end +local function Helper_Tooltip3(realm) + if(not db['connectedRealms']) then return end + connectedRealms = connectedRealms or GetAutoCompleteRealms() + for k, v in pairs(connectedRealms) do + if(v == realm) then + return true + end + end +end +local function OnClick(self, button) + if(IsShiftKeyDown() and button == "LeftButton") then + local sb = addonTable['db']['global']['ldbicons'] + sb[childName]['hide'] = not sb[childName]['hide'] + if(ldbicon) then + if(sb[childName]['hide']) then + ldbicon:Hide(childName) + else + ldbicon:Show(childName) + end + end + else + if(not InCombatLockdown()) then + if(InterfaceOptionsFrame:IsVisible()) then + InterfaceOptionsFrame:Hide() + else + InterfaceOptionsFrame_OpenToCategory(childName) + InterfaceOptionsFrame_OpenToCategory(childName) -- Twice because of a bug in InterfaceOptionsFrame_OpenToCategory + end + end + end +end +local function OnTooltipShow(tip) + tip:AddLine(childName) + if(faction == 'Neutral') then + tip:AddLine(L['neutral']) + return + end + local sessdiff = dbp['currentGold'] - session['start'] + local sdr,sdg,sdb = 1, 1, 1 + if(sessdiff<0) then + sdr,sdg,sdb = 1, 0, 0 + end + tip:AddDoubleLine(L['Sitzung'], addonTable:displayMoney(abs(sessdiff), db['shortMoneyTip']),1,1,0,sdr,sdg,sdb) + tip:AddDoubleLine(lineIn, addonTable:displayMoney(session['income'], db['shortMoneyTip']),1,1,1,1,1,1) + tip:AddDoubleLine(lineOut, addonTable:displayMoney(abs(session['expense']), db['shortMoneyTip']),1,1,1,1,1,1) + tip:AddLine(' ') + local sumOut,sumIn = getSumToday() + sessdiff = sumOut+sumIn + if(sessdiff<0) then + sdr,sdg,sdb = 1, 0, 0 + else + sdr,sdg,sdb = 1, 1, 1 + end + tip:AddDoubleLine(L['Heute'], addonTable:displayMoney(abs(sessdiff), db['shortMoneyTip']),1,1,0,sdr,sdg,sdb) + tip:AddDoubleLine(lineIn, addonTable:displayMoney(sumIn, db['shortMoneyTip']),1,1,1,1,1,1) + tip:AddDoubleLine(lineOut, addonTable:displayMoney(abs(sumOut), db['shortMoneyTip']),1,1,1,1,1,1) + tip:AddLine(' ') + local sumOut,sumIn = getSumToday(-1) + sessdiff = sumOut+sumIn + if(sessdiff<0) then + sdr,sdg,sdb = 1, 0, 0 + else + sdr,sdg,sdb = 1, 1, 1 + end + tip:AddDoubleLine(L['Gestern'], addonTable:displayMoney(abs(sessdiff), db['shortMoneyTip']),1,1,0,sdr,sdg,sdb) + tip:AddDoubleLine(lineIn, addonTable:displayMoney(sumIn, db['shortMoneyTip']),1,1,1,1,1,1) + tip:AddDoubleLine(lineOut, addonTable:displayMoney(abs(sumOut), db['shortMoneyTip']),1,1,1,1,1,1) + tip:AddLine(' ') + local sumOut,sumIn = getSumWeek() + sessdiff = sumOut+sumIn + if(sessdiff<0) then + sdr,sdg,sdb = 1, 0, 0 + else + sdr,sdg,sdb = 1, 1, 1 + end + tip:AddDoubleLine(L['7-Tage'], addonTable:displayMoney(abs(sessdiff), db['shortMoneyTip']),1,1,0,sdr,sdg,sdb) + tip:AddDoubleLine(lineIn, addonTable:displayMoney(sumIn, db['shortMoneyTip']),1,1,1,1,1,1) + tip:AddDoubleLine(lineOut, addonTable:displayMoney(abs(sumOut), db['shortMoneyTip']),1,1,1,1,1,1) + tip:AddLine(' ') + local sum = 0 + local ttlist = {} + if(addonTable['db']['sv']['profileKeys']) then + for k,v in pairs(addonTable['db']['sv']['profileKeys']) do + local n,_,m = strsplit(' ',k,3) + if(n) then + local cr = Helper_Tooltip3(m) + if(m == realm or cr) then + cdbCheck(n,cr and m or realm) + if( faction == db[cr and m or realm][n]['faction']) then + sum = sum + db[cr and m or realm][n]['currentGold'] + ttlist[k] = db[cr and m or realm][n]['currentGold'] + end + end + end + end + end + for _,v in pairs(addonTable:sortArray(ttlist,db['sortDir'])) do + local n,_,m = strsplit(' ',v,3) + local cr = Helper_Tooltip3(m) + tip:AddDoubleLine(addonTable:classcolor(n,db[cr and m or realm][n]['class']),addonTable:displayMoney(db[cr and m or realm][n]['currentGold']+(db[cr and m or realm][n]['incoming'] or 0), db['shortMoneyTip']),0,1,0,1,1,1) + end + tip:AddLine(' ') + tip:AddDoubleLine(L['Gesamt'],addonTable:displayMoney(sum, db['shortMoneyTip']),0,1,0,1,1,1) +end +function addonTable:GetBroker(objname) + return LibStub:GetLibrary("zzLDB"):GetLDB(objname) +end +function addonTable:OnText(objname, message) + local ldbobj = addonTable:GetBroker(objname) + if(ldbobj['text'] ~= message) then + ldbobj['text'] = message + end +end +addonTable['ldb'] = { -- https://github.com/tekkub/libdatabroker-1-1/wiki/Data-Specifications + ['type'] = 'data source', -- required: 'data source' or 'launcher' + ['text'] = childName, -- required/optional for launcher + ['icon'] = 'Interface\\Icons\\INV_Misc_Bag_10_Blue', -- optional/required for launcher + ['OnClick'] = OnClick, -- optional/required for launcher + ['OnTooltipShow'] = OnTooltipShow, -- optional +} diff --git a/core.lua b/core.lua new file mode 100644 index 0000000..d499672 --- /dev/null +++ b/core.lua @@ -0,0 +1,130 @@ +local addonName, addonTable = ... +local childName = "zzMoney2" +local db, dbr, dbp, faction, realm, connectedRealms +addonTable['events'] = addonTable['events'] or {} +local events = addonTable['events'] +local session = { start = 0, income = 0, expense = 0 } +local L = LibStub("AceLocale-3.0"):GetLocale(childName, true) +local function prepareDB() + local player = UnitName('player') + realm = GetNormalizedRealmName() + if(not realm) then return end + faction = UnitFactionGroup('player') + local className, classFilename, classId = UnitClass('player') + addonTable['db']['profile'][childName] = addonTable['db']['profile'][childName] or {} + db = addonTable['db']['profile'][childName] + db[realm] = db[realm] or {} + db[faction] = db[faction] or {} + db[faction]['banker'] = db[faction]['banker'] or {} + db[faction]['banker']['banker'] = db[faction]['banker']['banker'] or player + dbr = db[realm] + dbr['activity'] = dbr['activity'] or { Horde = {}, Alliance={}} + dbr['Horde'] = dbr['Horde'] or {} + dbr['Alliance'] = dbr['Alliance'] or {} + dbr[player] = dbr[player] or {} + dbp = dbr[player] + dbp['faction'] = faction + dbp['currentGold'] = dbp['currentGold'] or 0 + dbp['class'] = classFilename + dbp['faction'] = faction + addonTable['storage'] = { + ['db'] = db, + ['dbr'] = dbr, + ['dbp'] = dbp, + ['dbf'] = db[faction], + ['L'] = L, + ['session'] = session, + ['faction'] = faction, + ['realm'] = realm, + } + addonTable:SetupPrefs(childName) + addonTable:SetupBroker() + addonTable:SetupBanker() +end +function addonTable:getDateString() + return format("%s%s",tostring(date("%Y")),tostring(1000 + date("%j"))) +end +local specs = { + ['name'] = childName, + ['sv'] = true, + ['cfg'] = true, + ['cfgReset'] = prepareDB, + ['ldb'] = addonTable['ldb'] , + ['defaults'] = { + ['profile'] = { + [childName] = { + ['disableBanker'] = true, + } + } + } +} +function addonTable:displayMoney(money, abr) + if(abr) then + local ab = false + if(db['abrevM'] and money >= 10000000000) then + ab = L['abrM'] + money = addonTable:round(money / 10000000000,1) * 10000 + elseif(db['abrevK'] and money >= 10000000) then + ab = L['abrK'] + money = addonTable:round(money / 10000000,1) * 10000 + end + if(ab) then + if(db['shortMoney'] and money>10000)then + money = addonTable:round(money / 10000,0) * 10000 + end + return gsub(GetCoinTextureString(money), "(%d+)", function(num) return format('%i%s',num, ab) end,1) + end + end + if(db['shortMoney'] and money>10000)then + money = addonTable:round(money / 10000,0) * 10000 + end + return GetCoinTextureString(money) +end +local pew_events = {} +function pew_events:PLAYER_MONEY(event) + local money = GetMoney() + if(money == 0) then return end + if(session['start'] == 0) then + session['start'] = money + end + dbp['currentGold'] = dbp['currentGold'] or 0 + dbp['incoming'] = 0 + if(money ~= dbp['currentGold']) then + local diff = money - dbp['currentGold'] + local out = GetCoinTextureString(abs(diff)) + local color = "ffffff" + local stamp = time() + local day = addonTable:getDateString() + local dba = dbr['activity'][faction] + dba[day] = dba[day] or {} + local dbd = dba[day] + while(dbd[stamp]) do + stamp = stamp + 1 + end + if(diff < 0) then + color = "ff0000" + session['expense'] = session['expense'] + diff + else + session['income'] = session['income'] + diff + end + dbd[stamp] = diff + if(db['showLog']) then + print(addonTable:colorize(out, color)) + end + dbp['currentGold'] = money + end + addonTable:OnText(childName, addonTable:displayMoney(money, true)) +end +function addonTable:PrefChanged(pref, value, oldvalue) + pew_events:PLAYER_MONEY() +end +function events:PLAYER_ENTERING_WORLD(event) + addonTable['db']['profile'][childName ] = addonTable['db']['profile'][childName] or {} + db = addonTable['db']['profile'][childName] + prepareDB() + addonTable:UnregisterEvent('PLAYER_ENTERING_WORLD') + addonTable:RegisterEvent(pew_events) + pew_events:PLAYER_MONEY() +end +LibStub:GetLibrary("zzAddOn"):NewAddOn(specs, ...) + diff --git a/helper.lua b/helper.lua new file mode 100644 index 0000000..24593cf --- /dev/null +++ b/helper.lua @@ -0,0 +1,67 @@ +local addonName, addonTable = ... +function addonTable:colorize(text, color) + return string.format("|cff%s%s|r",color and color or 'ffffff',text and text or '') +end +function addonTable:classcolor(text,class) + class = RAID_CLASS_COLORS[class] and class or "PRIEST" + return string.format("|c%s%s|r",RAID_CLASS_COLORS[class]['colorStr'],text) +end +function addonTable:round(num, idp) + return math.floor(num * (10^(idp or 0)) + 0.5) / (10^(idp or 0)) +end +function addonTable:sortArray(tmp,dir) + local newtmp = {} + local n = 1 + local cnt = 0 + local maximum = 0 + local first + for k,v in pairs(tmp) do + cnt = cnt + 1 + if(v > maximum) then + maximum = v + 1 + end + first = first or k + end + while(cnt > 0) do + local mx, mn = dir and maximum or 0,first + for k,v in pairs(tmp) do + if(dir) then + if(tonumber(v)<=tonumber(mx)) then + mx = v + mn = k + end + else + if(tonumber(v)>=tonumber(mx)) then + mx = v + mn = k + end + end + end + newtmp[n] = mn + tmp[mn] = nil + cnt = 0 + for k,v in pairs(tmp) do + cnt = cnt + 1 + end + n = n + 1 + mn = 0 + mx = dir and mx or 0 + end + return newtmp +end +function addonTable:IsTwink(name) + local realm = GetRealmName() + local _ + if(self['db']['sv']['profileKeys']) then + for k,v in pairs(self['db']['sv']['profileKeys']) do + local n,m = strsplit(" - ",k,2) + _,m = strsplit(" ",m,2) + if(n) then + if(n == name and m == realm) then + return true + end + end + end + end + return false +end \ No newline at end of file diff --git a/locale_deDE.lua b/locale_deDE.lua new file mode 100755 index 0000000..c50695a --- /dev/null +++ b/locale_deDE.lua @@ -0,0 +1,48 @@ +local addonname, addon = ... +local name = "zzMoney2" +local L = LibStub("AceLocale-3.0"):NewLocale(name, "deDE", false) +if L then + L[name] = name + L[name..' Settings'] = name..' Einstellungen' + L['Sitzung']='Sitzung' + L['Einnahmen']='Einnahmen' + L['Ausgaben']='Ausgaben' + L['Heute']='Heute' + L['Gestern']='Gestern' + L['7-Tage']='7-Tage' + L['Gesamt']='Gesamt' + L['Bankier']='Bankier' + L['Goldgrenze']='Goldgrenze' + L['Sende'] = 'Sende' + L['Subject'] = 'Ab in den Sparstrumpf' + L['Minimum Limit']='Minimum Limit' + L['Desc MinL']='Spieler mit Gold unter diesem Limit werden dem Bankier angzeigt' + L['Maximum Limit']='Maximum Limit' + L['Desc MaxL']='Spieler mit Gold \195\188ber diesem Limit bekommen einen Knopf im Postfenster um es an den Bankier zu schicken' + L['Empfaenger']='Empf\195\164nger' + L['Fail']='Sendung fehlgeschlagen' + L['Success']=function(name,sum) return format("Betrag von %s an %s gesendet", GetCoinTextureString(sum), name) end + L['iconSize']='M\195\188nzgr\195\182\195\159e' + L['sortDir'] = 'Tooltip-Sortierung Auf-/Absteigend' + L['nobanker'] = 'Bankier deaktivieren' + L['neutral'] = 'Deaktiviert solange neutral' + L['accountMoneyDesc'] = 'Zeige accountweiten Goldbestand' + L['accountMoney'] = 'Globales Gold' + L['shortMoney'] = 'Gold runden' + L['shortMoneyTip'] = 'Gold im Tooltip k\195\188rzen' + L['abrevK'] = "Geldanzeige k\195\188rzen k" + L['abrevM'] = "Geldanzeige k\195\188rzen m" + L['abrK'] = "k" + L['abrM'] = "m" + L['connectedRealms'] = "Zeige verbundene Realms" + L['DeleteChar'] = "L\195\182sche Char" + L['DeleteCharDesc'] = "Entferne alle Daten zu diesem Character" + L['DeleteCharOk'] = "Ja, ich bin sicher!" + L['showLog'] = "Logge Ver\195\164nderungen im Chat" +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 new file mode 100755 index 0000000..f6884d3 --- /dev/null +++ b/locale_enUS.lua @@ -0,0 +1,42 @@ +local addonname, addon = ... +local name = "zzMoney2" +local L = LibStub("AceLocale-3.0"):NewLocale(name, "enUS", true) +if L then + L[name] = name + L[name..' Settings'] = name..' Settings' + L['Sitzung']='Session' + L['Einnahmen']='Income' + L['Ausgaben']='Expenses' + L['Heute']='Today' + L['Gestern']='Yesterday' + L['7-Tage']='7-Days' + L['Gesamt']='Total' + L['Bankier']='Banker' + L['Goldgrenze']='Goldlimit' + L['Sende'] = 'Send' + L['Subject'] = 'Sock away' + L['Minimum Limit']='Minimum Limit' + L['Desc MinL']='Chars with less than this limit will be shown to the banker' + L['Maximum Limit']='Maximum Limit' + L['Desc MaxL']='Chars with more than this limit will see a button in the send mail window to send it to the banker' + L['Empfaenger']='Beneficiary' + L['Fail']='Mail failed' + L['Success']=function(name,sum) return format("Sent %s to %s", GetCoinTextureString(sum), name) end + L['iconSize']='Coinsize' + L['sortDir'] = 'Sort Tooltip Up/Down' + L['nobanker'] = 'Disable banker functionality' + L['neutral'] = 'Disabled while neutral' + L['accountMoney'] = 'Global Money' + L['accountMoneyDesc'] = 'Show accountwide Money' + L['shortMoney'] = 'Display gold only' + L['shortMoneyTip'] = 'Shorten money in tooltip' + L['abrevK'] = "Shorten money display k" + L['abrevM'] = "Shorten money display m" + L['abrK'] = "k" + L['abrM'] = "m" + L['connectedRealms'] = "List connected Realms" + L['DeleteChar'] = "Delete Char" + L['DeleteCharDesc'] = "Removes all data for this character" + L['DeleteCharOk'] = "Yes, I'm sure!" + L['showLog'] = "Log changes in chat" +end \ No newline at end of file diff --git a/locale_koKR.lua b/locale_koKR.lua new file mode 100755 index 0000000..7ec8081 --- /dev/null +++ b/locale_koKR.lua @@ -0,0 +1,42 @@ +local addonname, addon = ... +local name = "zzMoney2" +local L = LibStub("AceLocale-3.0"):NewLocale(name, "koKR", false) +if L then + L[name] = name + L[name..' Settings'] = name..' 설정' + L['Sitzung']='세션' + L['Einnahmen']='수입' + L['Ausgaben']='지출' + L['Heute']='오늘' + L['Gestern']='어제' + L['7-Tage']='7일' + L['Gesamt']='전체' + L['Bankier']='은행' + L['Goldgrenze']='골드 제한' + L['Sende'] = '보내기' + L['Subject'] = '모우기' + L['Minimum Limit']='최소 제한' + L['Desc MinL']='Chars with less than this limit will be shown to the banker' + L['Maximum Limit']='최대 제한' + L['Desc MaxL']='Chars with more than this limit will see a button in the send mail window to send it to the banker' + L['Empfaenger']='수령인' + L['Fail']='우편물 발송 실패' + L['Success']=function(name,sum) return format("Sent %s to %s", GetCoinTextureString(sum), name) end + L['iconSize']='골드 아이콘 크기' + L['sortDir'] = '위/아래로 툴팁 정렬' + L['nobanker'] = '은행 기능 비활성화' + L['neutral'] = '중립적인 동안 비활성화' + L['accountMoney'] = 'Global Money' + L['accountMoneyDesc'] = 'Show accountwide Money' + L['shortMoney'] = '골드만 표시' + L['shortMoneyTip'] = 'Shorten money in tooltip' + L['abrevK'] = "Shorten money display k" + L['abrevM'] = "Shorten money display m" + L['abrK'] = "k" + L['abrM'] = "m" + L['connectedRealms'] = "List connected Realms" + L['DeleteChar'] = "Delete Char" + L['DeleteCharDesc'] = "Removes all data for this character" + L['DeleteCharOk'] = "Yes, I'm sure!" + L['showLog'] = "Log changes in chat" +end \ No newline at end of file diff --git a/locale_ruRU.lua b/locale_ruRU.lua new file mode 100755 index 0000000..d6dac6f --- /dev/null +++ b/locale_ruRU.lua @@ -0,0 +1,42 @@ +local addonname, addon = ... +local name = "zzMoney2" +local L = LibStub("AceLocale-3.0"):NewLocale(name, "ruRU", false) +if L then + L[name] = name + L[name..' Settings'] = name..' Настройки' + L['Sitzung']='Сессия' + L['Einnahmen']='Доход' + L['Ausgaben']='Расход' + L['Heute']='Сегодня' + L['Gestern']='Вчера' + L['7-Tage']='7-Дней' + L['Gesamt']='Всего' + L['Bankier']='Банкир' + L['Goldgrenze']='Лимит золота' + L['Sende'] = 'Отправить' + L['Subject'] = 'Лишнее золото' + L['Minimum Limit']='Минимальный лимит' + L['Desc MinL']='Персонажи с золотом меньше указанного значения будут показаны банкиру' + L['Maximum Limit']='Максимальный лимит' + L['Desc MaxL']='Персонажи с золотом больше указанного лимита будут видеть кнопку для отправки избытка золота банкиру' + L['Empfaenger']='Бенефициар' + L['Fail']='Не удалось отправить письмо' + L['Success']=function(name,sum) return format("Sent %s to %s", GetCoinTextureString(sum), name) end + L['iconSize']='Размер монеты' + L['sortDir'] = 'Сортировка Верх/Низ' + L['nobanker'] = 'Отключить функцию банкира' + L['neutral'] = 'Отключено пока не выбрана фракция' + L['accountMoney'] = 'Золота на аккаунте' + L['accountMoneyDesc'] = 'Показать все золото на аккаунте' + L['shortMoney'] = 'Показывать только золото' + L['shortMoneyTip'] = 'Shorten money in tooltip' + L['abrevK'] = "Сокращать золото до тысяч" + L['abrevM'] = "Сокращать золото до миллионов" + L['abrK'] = "k" + L['abrM'] = "m" + L['connectedRealms'] = "List connected Realms" + L['DeleteChar'] = "Delete Char" + L['DeleteCharDesc'] = "Removes all data for this character" + L['DeleteCharOk'] = "Yes, I'm sure!" + L['showLog'] = "Log changes in chat" +end \ No newline at end of file diff --git a/pack.xml b/pack.xml new file mode 100755 index 0000000..c1bc050 --- /dev/null +++ b/pack.xml @@ -0,0 +1,11 @@ + +