From 7c306ad881003e1f95c1f3aa4922bcf17b4b462a Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 13 Jan 2021 16:15:33 +0100 Subject: [PATCH] Init --- .gitmodules | 3 + Common | 1 + core.lua | 339 +++++++++++++++++++++++++++++++++++++++++++++++ icon2.tga | Bin 0 -> 2942 bytes license.txt | 6 + locale_deDE.lua | 91 +++++++++++++ locale_enUS.lua | 85 ++++++++++++ pack.xml | 5 + zz_Infoclock.toc | 16 +++ 9 files changed, 546 insertions(+) create mode 100644 .gitmodules create mode 160000 Common create mode 100644 core.lua create mode 100644 icon2.tga create mode 100644 license.txt create mode 100644 locale_deDE.lua create mode 100644 locale_enUS.lua create mode 100644 pack.xml create mode 100644 zz_Infoclock.toc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..34950ac --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Common"] + path = Common + url = https://git.grml.de/rilgamon/Common.git diff --git a/Common b/Common new file mode 160000 index 0000000..762c59c --- /dev/null +++ b/Common @@ -0,0 +1 @@ +Subproject commit 762c59c6c6abc6ecaa71f3e36bb2c6dd16b8e0ed diff --git a/core.lua b/core.lua new file mode 100644 index 0000000..5648032 --- /dev/null +++ b/core.lua @@ -0,0 +1,339 @@ +local name, addon = ... +local parentName = addon['parentName'] or "BrokerPack" +local childName = "zz_Infoclock" +local replaces = { + ['Sunday'] = true, + ['Monday'] = true, + ['Tuesday'] = true, + ['Wednesday'] = true, + ['Thursday'] = true, + ['Friday'] = true, + ['Saturday'] = true, + ['January'] = true, + ['February'] = true, + ['March'] = true, + ['April'] = true, + ['May'] = true, + ['June'] = true, + ['July'] = true, + ['August'] = true, + ['September'] = true, + ['October'] = true, + ['November'] = true, + ['December'] = true, +} +local L = LibStub("AceLocale-3.0"):GetLocale(childName, true) +local defcolor = "ffffff" +local defaults = { + ["showClock"] = true, + ["showLatency"] = true, + ["showFPS"] = true, + ["update"] = 2, + ["clockstring"] = "%H:%M", + ["datestring"] = "%A, %d.%B", + ["latencystring"] = "%world ms", + ["fpsstring"] = "%fps "..L['FPS'], + ["ldbstring"] = "%clock %latency %fps", + ['datecolor'] = defcolor, + ['fpscolor'] = defcolor, + ['clockcolor'] = defcolor, + ['latencycolor'] = "ffff00", +} +local options = {} +local ldb = LibStub:GetLibrary("LibDataBroker-1.1") +local ldbicon = LibStub("LibDBIcon-1.0") +local cols = { + ['datecolor'] = true, + ['fpscolor'] = true, + ['clockcolor'] = true, + ['latencycolor'] = true, +} + +local ainfo = {} +local GetNumAddOns = GetNumAddOns +local GetAddOnInfo = GetAddOnInfo +local GetAddOnMemoryUsage = GetAddOnMemoryUsage +local GetAddOnCPUUsage = GetAddOnCPUUsage +local IsAddOnLoaded = IsAddOnLoaded + +local line + +-- Fix Classic +local C_CVar = C_CVar or { + GetCVarBool = function(value) + return GetCVar(value) and true or false + end +} +local GameTimeFrame_OnClick = GameTimeFrame_OnClick or function(self) TimeManagerClockButton:Click() end +-- End of Fix Classic + +local nextUpdate = GetTime() +local db = {} + +local function toggleColor(col,col1,col2) + return col == col1 and col2 or col1 +end + +local function compute() + local c = date(db['clockstring']) + local d = date(db['datestring']) + for k in pairs(replaces) do + if(k ~= L[k]) then + d = d:gsub(k, L[k]) + end + end + local h, w = select(3,GetNetStats()) + local l = db['latencystring'] + l = l:gsub("%%world", w) + l = l:gsub("%%local", h) + local f = db['fpsstring'] + f = f:gsub("%%fps",floor(GetFramerate())) + return c,d,l,f +end + +local function sortTab(a,b) + return a['mem'] > b['mem'] +end +local function sortTab2(a,b) + return a['cpu'] > b['cpu'] +end + +local ainfodelay, lastainfo = 2, GetTime() + +local function updateainfo() + wipe(ainfo) + UpdateAddOnMemoryUsage() + UpdateAddOnCPUUsage() + local name, enabled, security, mem, cpu, _ + for i=1, GetNumAddOns() do + mem = 0 + cpu = 0 + name, _, _, enabled, _, _, security = GetAddOnInfo(i) + if(name and enabled and IsAddOnLoaded(i)) then + mem = GetAddOnMemoryUsage(i) + cpu = GetAddOnCPUUsage(i) + ainfo[#ainfo+1] = { + ['name'] = name, + ['mem'] = mem, + ['cpu'] = cpu, + } + end + end + +end + +local function OnTooltip(tip) + if(GetTime() > lastainfo) then + updateainfo() + lastainfo = GetTime() + ainfodelay + end + local c,d,l,f = compute() + tip:AddLine(childName) + local col = "00ff00" + if(db['expert']) then + tip:AddLine(addon:colorize(d,col)) + else + tip:AddLine(addon:colorize(format("%s, %s.%s",L[date("%A")],date("%d"),L[date("%B")]),col)) + end + col = toggleColor(col,"ffffff","00ff00") + if(db["12-Hours"]) then + tip:AddDoubleLine(addon:colorize(L['Time'],col),addon:colorize(date("%I:%M:%S"),toggleColor(col,"ffffff","00ff00"))) + else + tip:AddDoubleLine(addon:colorize(L['Time'],col),addon:colorize(date("%H:%M:%S"),toggleColor(col,"ffffff","00ff00"))) + end + col = toggleColor(col,"ffffff","00ff00") + tip:AddDoubleLine(addon:colorize(L['Latency'],col),addon:colorize(format("%s ms",select(3,GetNetStats())),toggleColor(col,"ffffff","00ff00"))) + col = toggleColor(col,"ffffff","00ff00") + tip:AddDoubleLine(addon:colorize(L['FPS'],col),addon:colorize(format("%i fps",floor(GetFramerate())),toggleColor(col,"ffffff","00ff00"))) + col = toggleColor(col,"ffffff","00ff00") + tip:AddDoubleLine(addon:colorize(L['AddOn Memory'],col),addon:colorize(format("%i MB",floor(collectgarbage('count')/1024)),toggleColor(col,"ffffff","00ff00"))) + tip:AddLine(" ") + tip:AddLine(L["AddOns"]) + sort(ainfo,sortTab) + local sum,cnt = 0,0 + for _, v in ipairs(ainfo) do + if(cnt<9) then + tip:AddDoubleLine(addon:colorize(v['name'],"00ffff"),format(L["%i kB"],v['mem'])) + cnt = cnt + 1 + end + sum = sum + v['mem'] + end + tip:AddDoubleLine(L['total'],format(L["%i kB"],format("%.2f",sum))) + local pCPU = C_CVar.GetCVarBool("scriptProfile") + if(pCPU) then + tip:AddLine(" ") + tip:AddLine(L["CPU"]) + sort(ainfo,sortTab2) + sum,cnt = 0,0 + for _, v in ipairs(ainfo) do + if(cnt<5) then + tip:AddDoubleLine(addon:colorize(v['name'],"00ffff"),format(L["%i ms"],v['cpu'])) + cnt = cnt + 1 + end + sum = sum + v['cpu'] + end + tip:AddDoubleLine(L['total'],format(L["%i ms"],format("%.2f",sum))) + end + tip:AddLine(" ") + tip:AddLine(L['HINT4']) + tip:AddLine(L["garbagecollect"]) + tip:AddLine(L['HINT3']) + tip:AddLine(L['HINT5']) +end + +local function OnText(message) + addon:OnText(childName, message) +end + +local function OnButton(self, button) + if(button == 'RightButton') then + InterfaceOptionsFrame_OpenToCategory(childName) + InterfaceOptionsFrame_OpenToCategory(childName) -- twice needed + elseif(button == 'MiddleButton') then + local pCPU = C_CVar.GetCVarBool("scriptProfile") + if(pCPU) then + pCPU = 0 + else + pCPU = 1 + end + C_CVar.SetCVar("scriptProfile", pCPU) + addon:Print(L["CPU setting changed. Please Reload UI."]) + updateainfo() + else + if(IsShiftKeyDown()) then + local db = addon['db']['global']['ldbicons'] + db[childName]['hide'] = not db[childName]['hide'] + if(ldbicon) then + if(db[childName]['hide']) then + ldbicon:Hide(childName) + else + ldbicon:Show(childName) + end + end + elseif(IsControlKeyDown()) then + addon:Print(L["garbagecollected"]) + collectgarbage("collect") + else + GameTimeFrame_OnClick(_G["GameTimeFrame"]) + end + end +end + +local function OnDataUpdate() + if(db['expert']) then + local c,d,l,f = compute() + line = db['ldbstring'] + line = line:gsub("%%clock", addon:colorize(c,db['clockcolor'])) + line = line:gsub("%%date", addon:colorize(d,db['datecolor'])) + line = line:gsub("%%fps", addon:colorize(f,db['fpscolor'])) + line = line:gsub("%%latency", addon:colorize(l,db['latencycolor'])) + else + line = '' + if(db["showClock"]) then + line = format("%s%s ", line, db["12-Hours"] and date("%I:%M") or date("%H:%M")) + end + if(db["showLatency"]) then + line = format("%s%s",line,addon:colorize(format("%s ms ",select(3,GetNetStats())),"ffff00")) + end + if(db["showFPS"]) then + line = format("%s%s fps", line, floor(GetFramerate())) + end + end + if(line ~= '') then + OnText(line) + else + OnText(childName) + end + C_Timer.After(db['update'], OnDataUpdate) +end + +local function getPref(pref) + if(cols[pref[#pref]]) then + local r,g,b = addon:Hex2RGB(db[pref[#pref]]) + return r/255,g/255,b/255,1 + end + return db[pref[#pref]] +end + +local function setPref(pref,value,g,b) + db[pref[#pref]] = cols[pref[#pref]] and addon:RGB2Hex(value*255,g*255,b*255) or value +end +local function expertMode() + return not db['expert'] +end +local function init() + options = addon:InitConfig(childName, true, { + ['name'] = childName, + ['type'] = "data source", + ['OnTooltipShow'] = OnTooltip, + ['OnClick'] = OnButton, + }, getPref, setPref) + db = addon['db']['profile'][childName] + db["update"] = db["update"] or 1 + db["clockstring"] = db["clockstring"] or (db["12-Hours"] and "%I:%M" or "%H:%M") + db["datestring"] = db["datestring"] or "%A, %d.%B" + db["latencystring"] = db["latencystring"] or "%world ms" + db["fpsstring"] = db["fpsstring"] or "%fps "..L['FPS'] + db["ldbstring"] = db["ldbstring"] or "%clock %latency %fps" + for k in pairs(cols) do + db[k] = db[k] or defcolor + end + local menu = addon:AddConfigMenu({ + ['name'] = L['Clock'], + ['order'] = 3, + ['menuGet'] = getPref, + ['menuSet'] = setPref, + ['disabled'] = expertMode, + }, options) + addon:AddConfigEntry(childName,"input","clockstring",L['Clock'],nil,1,nil,nil,nil,nil,menu) + addon:AddConfigEntry(childName,"color","clockcolor",L['Clock'],nil,2,nil,nil,nil,nil,menu) + addon:AddConfigEntry(childName,"description","dateinfo",L['dateinfo'],nil,100,nil,nil,nil,nil,menu) + local menu2 = addon:AddConfigMenu({ + ['name'] = L['Date'], + ['order'] = 4, + ['menuGet'] = getPref, + ['menuSet'] = setPref, + ['disabled'] = expertMode, + }, options) + addon:AddConfigEntry(childName,"input","datestring",L['Date'],nil,1,nil,nil,nil,nil,menu2) + addon:AddConfigEntry(childName,"color","datecolor",L['Date'],nil,2,nil,nil,nil,nil,menu2) + addon:AddConfigEntry(childName,"description","dateinfo",L['dateinfo'],nil,100,nil,nil,nil,nil,menu2) + local menu3 = addon:AddConfigMenu({ + ['name'] = L['Latency'], + ['order'] = 5, + ['menuGet'] = getPref, + ['menuSet'] = setPref, + ['disabled'] = expertMode, + }, options) + addon:AddConfigEntry(childName,"input","latencystring",L['Latency'],nil,1,nil,nil,nil,nil,menu3) + addon:AddConfigEntry(childName,"color","latencycolor",L['Latency'],nil,2,nil,nil,nil,nil,menu3) + addon:AddConfigEntry(childName,"description","latencyinfo",L['Latencystring'],nil,100,nil,nil,nil,nil,menu3) + local menu4 = addon:AddConfigMenu({ + ['name'] = L['FPS'], + ['order'] = 6, + ['menuGet'] = getPref, + ['menuSet'] = setPref, + ['disabled'] = expertMode, + }, options) + addon:AddConfigEntry(childName,"input","fpsstring",L['FPS'],nil,1,nil,nil,nil,nil,menu4) + addon:AddConfigEntry(childName,"color","fpscolor",L['FPS'],nil,2,nil,nil,nil,nil,menu4) + addon:AddConfigEntry(childName,"description","fpsinfo",L['fpsstring'],nil,100,nil,nil,nil,nil,menu4) + local menu5 = addon:AddConfigMenu({ + ['name'] = L['LDB'], + ['order'] = 7, + ['menuGet'] = getPref, + ['menuSet'] = setPref, + ['disabled'] = expertMode, + }, options) + addon:AddConfigEntry(childName,"input","ldbstring",L['LDB'],nil,1,nil,nil,nil,nil,menu5) + addon:AddConfigEntry(childName,"description","ldbinfo",L['ldbstring'],nil,100,nil,nil,nil,nil,menu5) + + addon:AddConfigEntry(childName,"toggle","showClock",L['Show Clock'],nil,2,nil,nil,nil,nil,options) + addon:AddConfigEntry(childName,"toggle","showLatency",L['Show Latency'],nil,3,nil,nil,nil,nil,options) + addon:AddConfigEntry(childName,"toggle","showFPS",L['Show FPS'],nil,4,nil,nil,nil,nil,options) + addon:AddConfigEntry(childName,"toggle","12-Hours",L['12-Hours'],nil,5,nil,nil,nil,nil,options) + addon:AddConfigEntry(childName,"toggle","expert",L['Expert'],nil,6,nil,nil,nil,nil,options) + C_Timer.After(db['update'], OnDataUpdate) +end + +addon:startup(name, childName, init, true, defaults) \ No newline at end of file diff --git a/icon2.tga b/icon2.tga new file mode 100644 index 0000000000000000000000000000000000000000..5fee9b2ea60463864dd39659e950f55a6be8e79c GIT binary patch literal 2942 zcmX|D2~bp57HzkLiHi0AX%!Zh-Lq{rdr9a&mG4?`CCr@%zHq=1)LMN&IzTVWE`XCTefb+=FOY2h1Om)wtIWidms4j@TG74;On~+K09_G zK0Y3qcQa+Fsj1U=cmJn;L_ii#J$&>K!KZ>D>5za^tD#nN&~RF4^;&4O9JCq@v^p(R zN)1#h4obNa3b}%Y9J1~noWF1$Nl8gaPEJna)n8)X&t&OMOG|UQpOa&V2nz#C%ka=3 ztQHPtBZpxt2fbbgt4V`l8wZP-gKba+vsMi)nY9|!&}-BfvYJp=U5OJXP9h~GWh6E> z_FsGeyqQ@n^JJztAt8Z0NP^uqi0*zZqMi)mO1TZm&n%=?4uejKh(a5#R16`azzQ9w z#NeO;xs?W7C)xF5p>&%gkl@M3$kLT)s;eW$|IX^2Ao~^{3pDc(HS#UbTf|)*Q%l+#y5Y3B32#4iW01~|f&JvklL!qBtqlnY`9#Qq#q$|l+$-UI_!-GRqO0v4-25uww5l4eTb`p+(g>?n zjeTb;FlR#*mTs*?hNuo2RUbHxE-a@!|W8q1c0%Qgz+_$4?DwpM@I)RWI#xU0xtVG1g4r0 zkZ8nTJ(c)ftib2KO88$f;`A*OzB{79mJkgFq^}{${~aHiTG2p8V-w;a>+Hjm(o(#5 z@f;2H^{9OLk`WK&@&Tw-YC>H!m=i~j9u05|3JQA2pm^`zJyX0()^eg`VGinsB&;4yyrWj}WRwEL-}zrTOckt0VS6bd1gN})Fxpym1zol=YC zJF2j1S0%DVub?$)(M2d*zgvuX>nh=Y<~b3V9M(ZI&*+iSQG5xPS3HA_*ym%H4C%M; zAR!?hag>$Ub+4(QOz7?F!|BtfKz6Zlqeqz|arb$~<%bR(;xVAp>7XI9RV#ZjAZy0! z5A6tkU_;6);8>m=jqRN<8(Ls8O3^KCLwkD%f$Tl{`nsW3aD)RTfv+8{k`}ys|DKMu z9i1IgB5^ITs|6{h5v$K=G7c|8Eu6uj1 z@)(DM@j9$Np~mOleK6?dxSf%SrWPtgX%|Y0ijk3#Mc0!W>Dd`*YiTCrH{(u52BH56 zZ(KvTV5RTj;Q>ddIdGoqynJ|gc$9*^m_L7hl&h;Ne=rO&dcB@P;}ChP1=HP|F?Wju zQ&u(OXiO8anGrW{rr_4C+ep8cg^2J_6qS_HWvRi{8`p3zJBz>4qoZO_S64^rveA|D z2!4J)!pYGQ)22_4C6EXh35*ip?Afy&rcImHuw=;+95`?Q$>f5Y`&v+Q#)jMfQ_bIS<4JU5 z^5n_bLA?p}H!x7)g)puTQB(Udfur7Il)2T^Z>UJCiabz5s3vn03>0d0RW%MCJcy}N zr!xJSb~^-oM7;h9W5$e`MB>(Y^XBoeuB@!&IWUYBmw>f1mze%fm{Ofi4~Dp_SFd8> z!i7v-FYTYfYvS7srfwyPhgYmv0b)!@BobmYIWDoxj~N&kAeN^mwh$_a@5fQ&h)tU| z@!`{EPhJh*8I2=7@e?Ob1Oqz}AcRDP5C#SYLJ$xTFuDq5t8vGVA7?xXf(BFckl#P5 zgmg|JQ3uPRv$HdVEYQnrHEzLz1(-E!7Tckw&%WR{@GYf)9^J2!9Bk#s%lHPCJ?@R6 mDUz)Y^RinEp8P}`_}{iIUhBL!Y~A4bgR9T?8$8x668slwzWWFO literal 0 HcmV?d00001 diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..6d2e364 --- /dev/null +++ b/license.txt @@ -0,0 +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. +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 new file mode 100644 index 0000000..315b731 --- /dev/null +++ b/locale_deDE.lua @@ -0,0 +1,91 @@ +local addonname, tab = ... +local name = "zz_Infoclock" +local L = LibStub("AceLocale-3.0"):NewLocale(name, "deDE", false) +if L then + L[name] = name + L[name..' Settings'] = name..' Einstellungen' + L['Sunday'] = "Sonntag" + L['Monday'] = "Montag" + L['Tuesday'] = "Dienstag" + L['Wednesday'] = "Mittwoch" + L['Thursday'] = "Donnerstag" + L['Friday'] = "Freitag" + L['Saturday'] = "Samstag" + L['January'] = "Januar" + L['February'] = "Februar" + L['March'] = "M\195\164rz" + L['April'] = "April" + L['May'] = "Mai" + L['June'] = "Juni" + L['July'] = "Juli" + L['August'] = "August" + L['September'] = "September" + L['October'] = "Oktober" + L['November'] = "November" + L['December'] = "Dezember" + L['Show Clock'] = "Zeige Uhrzeit" + L['Show Latency'] = "Zeige Latenz" + L['Show FPS'] = "Zeige FPS" + L['Time'] = "Uhrzeit" + L['FPS'] = "FPS" + L['Latency'] = "Latenz" + L["garbagecollect"] = "|c0000ff00Strg-Linksklick|r |c00fffffferzwingt Garbage-Collect|r" + L['HINT3'] = "|c0000ff00Shift-Linksklick|r |c00ffffffschaltet Minimapicon an/aus|r" + L['HINT4'] = "|c0000ff00Linksklick|r |c00ffffffschaltet Kalender an/aus|r" + L['HINT5'] = "|c0000ff00Mittelklick|r |c00ffffffCPU Profiling \195\164ndern|r" + L['AddOn Memory'] = "AddOn Speicher" + L["garbagecollected"] = "Garbage-Collect erzwungen" + L["12-Hours"] = "12-Stunden" + L['Clock'] = "Uhr" + L['Date'] = "Datum" + L['Expert'] = "Expertenmodus" + L['LDB'] = "LDB" + L['dateinfo'] = [=[%a is replaced by the locales abbreviated weekday name. +%A is replaced by the locales full weekday name. +%b is replaced by the locales abbreviated month name. +%B is replaced by the locales full month name. +%c is replaced by the locales appropriate date and time representation. +%C is replaced by the century number the year divided by 100 and truncated to an integer as a decimal number 00-99. +%d is replaced by the day of the month as a decimal number 01,31. +%D same as %m/%d/%y. +%e is replaced by the day of the month as a decimal number 1,31; a single digit is preceded by a space. +%h same as %b. +%H is replaced by the hour 24-hour clock as a decimal number 00,23. +%I is replaced by the hour 12-hour clock as a decimal number 01,12. +%j is replaced by the day of the year as a decimal number 001,366. +%m is replaced by the month as a decimal number 01,12. +%M is replaced by the minute as a decimal number 00,59. +%n is replaced by a newline character. +%p is replaced by the locales equivalent of either a.m. or p.m. +%r is replaced by the time in a.m. and p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p. +%R is replaced by the time in 24 hour notation %H:%M. +%S is replaced by the second as a decimal number 00,61. +%t is replaced by a tab character. +%T is replaced by the time %H:%M:%S. +%u is replaced by the weekday as a decimal number 1,7 , with 1 representing Monday. +%U is replaced by the week number of the year Sunday as the first day of the week as a decimal number 00,53. +%V is replaced by the week number of the year Monday as the first day of the week as a decimal number 01,53. If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1. +%w is replaced by the weekday as a decimal number 0,6 , with 0 representing Sunday. +%W is replaced by the week number of the year Monday as the first day of the week as a decimal number 00,53. All days in a new year preceding the first Monday are considered to be in week 0. +%x is replaced by the locales appropriate date representation. +%X is replaced by the locales appropriate time representation. +%y is replaced by the year without century as a decimal number 00,99. +%Y is replaced by the year with century as a decimal number. +%Z is replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists. +%% is replaced by %.]=] +L["Latencystring"] = "%world %local" +L['fpsstring'] = "%fps" +L['ldbstring'] = "%clock %date %fps %latency" +L["%i kB"] = "%i kB" +L["%i ms"] = "%i ms" +L["AddOns"] = "AddOns" +L['CPU'] = 'CPU' +L['total'] = 'Gesamt' +L["CPU setting changed. Please Reload UI."] = "CPU Einstellung ge\195\164ndert. Bitte UI neu laden." +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 100644 index 0000000..8a58a9e --- /dev/null +++ b/locale_enUS.lua @@ -0,0 +1,85 @@ +local addonname, tab = ... +local name = "zz_Infoclock" +local L = LibStub("AceLocale-3.0"):NewLocale(name, "enUS", true) +if L then + L[name] = name + L[name..' Settings'] = name..' Settings' + L['Sunday'] = true + L['Monday'] = true + L['Tuesday'] = true + L['Wednesday'] = true + L['Thursday'] = true + L['Friday'] = true + L['Saturday'] = true + L['January'] = true + L['February'] = true + L['March'] = true + L['April'] = true + L['May'] = true + L['June'] = true + L['July'] = true + L['August'] = true + L['September'] = true + L['October'] = true + L['November'] = true + L['December'] = true + L['Show Clock'] = true + L['Show Latency'] = true + L['Show FPS'] = true + L['Time'] = true + L['FPS'] = true + L['Latency'] = true + L["garbagecollect"] = "|c0000ff00Ctrl-Leftclick|r |c00ffffffforces a garbage collect.|r" + L['HINT3'] = "|c0000ff00Shift-Leftclick|r |c00fffffftoggles minimap icon|r" + L['HINT4'] = "|c0000ff00Leftclick|r |c00fffffftoggles calendar|r" + L['HINT5'] = "|c0000ff00Middleclick|r |c00ffffffToggle CPU profiling|r" + L['AddOn Memory'] = true + L["garbagecollected"] = "Forced garbage collect" + L["12-Hours"] = true + L['Clock'] = "Clock" + L['Date'] = "Date" + L['Expert'] = "Expert mode" + L['LDB'] = "LDB" + L['dateinfo'] = [=[%a is replaced by the locales abbreviated weekday name. +%A is replaced by the locales full weekday name. +%b is replaced by the locales abbreviated month name. +%B is replaced by the locales full month name. +%c is replaced by the locales appropriate date and time representation. +%C is replaced by the century number the year divided by 100 and truncated to an integer as a decimal number 00-99. +%d is replaced by the day of the month as a decimal number 01,31. +%D same as %m/%d/%y. +%e is replaced by the day of the month as a decimal number 1,31; a single digit is preceded by a space. +%h same as %b. +%H is replaced by the hour 24-hour clock as a decimal number 00,23. +%I is replaced by the hour 12-hour clock as a decimal number 01,12. +%j is replaced by the day of the year as a decimal number 001,366. +%m is replaced by the month as a decimal number 01,12. +%M is replaced by the minute as a decimal number 00,59. +%n is replaced by a newline character. +%p is replaced by the locales equivalent of either a.m. or p.m. +%r is replaced by the time in a.m. and p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p. +%R is replaced by the time in 24 hour notation %H:%M. +%S is replaced by the second as a decimal number 00,61. +%t is replaced by a tab character. +%T is replaced by the time %H:%M:%S. +%u is replaced by the weekday as a decimal number 1,7 , with 1 representing Monday. +%U is replaced by the week number of the year Sunday as the first day of the week as a decimal number 00,53. +%V is replaced by the week number of the year Monday as the first day of the week as a decimal number 01,53. If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1. +%w is replaced by the weekday as a decimal number 0,6 , with 0 representing Sunday. +%W is replaced by the week number of the year Monday as the first day of the week as a decimal number 00,53. All days in a new year preceding the first Monday are considered to be in week 0. +%x is replaced by the locales appropriate date representation. +%X is replaced by the locales appropriate time representation. +%y is replaced by the year without century as a decimal number 00,99. +%Y is replaced by the year with century as a decimal number. +%Z is replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists. +%% is replaced by %.]=] + L["Latencystring"] = "%world %local" + L['fpsstring'] = "%fps" + L['ldbstring'] = "%clock %date %fps %latency" + L["%i kB"] = "%i kB" + L["%i ms"] = "%i ms" + L["AddOns"] = "AddOns" + L['CPU'] = 'CPU' +L['total'] = 'Total' +L["CPU setting changed. Please Reload UI."] = "CPU setting changed. Please Reload UI." +end \ No newline at end of file diff --git a/pack.xml b/pack.xml new file mode 100644 index 0000000..8367b95 --- /dev/null +++ b/pack.xml @@ -0,0 +1,5 @@ + +