added specs
This commit is contained in:
parent
31a426d370
commit
bee5187c77
|
@ -1,62 +1,103 @@
|
||||||
|
|
||||||
local addonName, addonNS = ...
|
local addonName, addonNS = ...
|
||||||
local ldb = LibStub("LibDataBroker-1.1")
|
local LDB = LibStub("LibDataBroker-1.1")
|
||||||
|
local LTT = LibStub("LibBabble-TalentTree-3.0"):GetLookupTable()
|
||||||
|
local LCT = LibStub("LibBabble-CreatureType-3.0"):GetLookupTable()
|
||||||
|
local LC = {} -- LOCALE CLASSES
|
||||||
|
local CC = {} -- CLASS COLOR
|
||||||
|
|
||||||
|
local classes_raw = {} -- conversion only
|
||||||
|
FillLocalizedClassList(classes_raw)
|
||||||
|
for token, localizedName in pairs(classes_raw) do
|
||||||
|
local color = RAID_CLASS_COLORS[token];
|
||||||
|
LC[token] = localizedName
|
||||||
|
CC[token] = color.colorStr
|
||||||
|
end
|
||||||
|
|
||||||
local defaults = { -- http://www.wowhead.com/guide=1100/buffs-and-debuffs
|
local defaults = { -- http://www.wowhead.com/guide=1100/buffs-and-debuffs
|
||||||
[1] = { -- Stats
|
[1] = { -- Stats
|
||||||
[1] = "Interface\\Icons\\spell_nature_regeneration",
|
[1] = "Interface\\Icons\\spell_nature_regeneration",
|
||||||
[2] = {"DRUID", "MONK", "PALADIN"}
|
[2] = {
|
||||||
|
{LC["DRUID"], CC["DRUID"]},
|
||||||
|
{LC["MONK"], CC["MONK"]},
|
||||||
|
{LC["PALADIN"], CC["PALADIN"]}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[2] = { -- Stamina
|
[2] = { -- Stamina
|
||||||
[1] = "Interface\\Icons\\spell_holy_wordfortitude",
|
[1] = "Interface\\Icons\\spell_holy_wordfortitude",
|
||||||
[2] = {"WARRIOR", "PRIEST", "WARLOCK"}
|
[2] = {
|
||||||
|
{LC["WARRIOR"], CC["WARRIOR"]},
|
||||||
|
{LC["PRIEST"], CC["PRIEST"]},
|
||||||
|
{LC["WARLOCK"], CC["WARLOCK"]}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[3] = { --Attack Power
|
[3] = { --Attack Power
|
||||||
[1] = "Interface\\Icons\\ability_warrior_battleshout",
|
[1] = "Interface\\Icons\\ability_warrior_battleshout",
|
||||||
[2] = {"DEATHKNIGHT", "WARRIOR", "HUNTER"}
|
[2] = {
|
||||||
|
{LC["DEATHKNIGHT"], CC["DEATHKNIGHT"]},
|
||||||
|
{LC["WARRIOR"], CC["WARRIOR"]},
|
||||||
|
{LC["HUNTER"], CC["HUNTER"]}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[4] = { --Haste
|
[4] = { --Haste
|
||||||
[1] = "Interface\\Icons\\spell_nature_bloodlust",
|
[1] = "Interface\\Icons\\spell_nature_bloodlust",
|
||||||
[2] = {"DEATHKNIGHT", "ROGUE", "PRIEST", "SHAMAN"}
|
[2] = {
|
||||||
|
{LC["DEATHKNIGHT"].." "..STAT_DPS_SHORT, CC["DEATHKNIGHT"]},
|
||||||
|
{LC["ROGUE"], CC["ROGUE"]},
|
||||||
|
{LC["PRIEST"].." "..LTT["Shadow"], CC["PRIEST"]},
|
||||||
|
{LC["SHAMAN"], CC["SHAMAN"]}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[5] = { --Spell Power
|
[5] = { --Spell Power
|
||||||
[1] = "Interface\\Icons\\spell_holy_magicalsentry",
|
[1] = "Interface\\Icons\\spell_holy_magicalsentry",
|
||||||
[2] = {"MAGE", "WARLOCK"}
|
[2] = {
|
||||||
|
{LC["MAGE"], CC["MAGE"]},
|
||||||
|
{LC["WARLOCK"], CC["WARLOCK"]}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[6] = { -- Critical Strike
|
[6] = { -- Critical Strike
|
||||||
[1] = "Interface\\Icons\\spell_nature_unyeildingstamina",
|
[1] = "Interface\\Icons\\spell_nature_unyeildingstamina",
|
||||||
[2] = {"MAGE", "DRUID", "MONK"}
|
[2] = {
|
||||||
|
{LC["MAGE"], CC["MAGE"]},
|
||||||
|
{LC["DRUID"].." "..LTT["Feral"], CC["DRUID"]},
|
||||||
|
{LC["MONK"].." "..STAT_CATEGORY_MELEE, CC["MONK"]}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[7] = { --Mastery
|
[7] = { --Mastery
|
||||||
[1] = "Interface\\Icons\\spell_holy_greaterblessingofkings",
|
[1] = "Interface\\Icons\\spell_holy_greaterblessingofkings",
|
||||||
[2] = {"DEATHKNIGHT", "SHAMAN", "DRUID", "PALADIN"}
|
[2] = {
|
||||||
|
{LC["DEATHKNIGHT"].." "..LTT["Blood"], CC["DEATHKNIGHT"]},
|
||||||
|
{LC["SHAMAN"], CC["SHAMAN"]},
|
||||||
|
{LC["DRUID"].." "..LTT["Balance"], CC["DRUID"]},
|
||||||
|
{LC["PALADIN"], CC["PALADIN"]}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[8] = { --Multistrike
|
[8] = { --Multistrike
|
||||||
[1] = "Interface\\Icons\\inv_elemental_mote_air01",
|
[1] = "Interface\\Icons\\inv_elemental_mote_air01",
|
||||||
[2] = {"ROGUE", "PRIEST", "WARLOCK", "MONK"}
|
[2] = {
|
||||||
|
{LC["ROGUE"], CC["ROGUE"]},
|
||||||
|
{LC["PRIEST"].." "..LTT["Shadow"], CC["PRIEST"]},
|
||||||
|
{LC["WARLOCK"], CC["WARLOCK"]},
|
||||||
|
{LC["MONK"].." "..STAT_DPS_SHORT, CC["MONK"]}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[9] = { --Versatility
|
[9] = { --Versatility
|
||||||
[1] = "Interface\\Icons\\spell_holy_mindvision",
|
[1] = "Interface\\Icons\\spell_holy_mindvision",
|
||||||
[2] = {"DEATHKNIGHT", "WARRIOR", "DRUID", "PALADIN"}
|
[2] = {
|
||||||
|
{LC["DEATHKNIGHT"].." "..STAT_DPS_SHORT, CC["DEATHKNIGHT"]},
|
||||||
|
{LC["WARRIOR"].." "..STAT_DPS_SHORT, CC["WARRIOR"]},
|
||||||
|
{LC["DRUID"], CC["DRUID"]},
|
||||||
|
{LC["PALADIN"].." "..STAT_DPS_SHORT, CC["PALADIN"]}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
classes_raw = {}
|
|
||||||
local classes = {}
|
|
||||||
FillLocalizedClassList(classes_raw)
|
|
||||||
for token, localizedName in pairs(classes_raw) do
|
|
||||||
local color = RAID_CLASS_COLORS[token];
|
|
||||||
classes[token] = {
|
|
||||||
["name"] = localizedName,
|
|
||||||
["color"] = color.colorStr
|
|
||||||
}
|
}
|
||||||
end
|
|
||||||
|
|
||||||
local function classColorLocalized(token)
|
local function classColorLocalized(color, spec)
|
||||||
return "\124c".. classes[token]["color"]..classes[token]["name"].."\124r"
|
return "\124c".. color..spec.."\124r"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local BrokerConsolidatedBuffs = ldb:NewDataObject("Broker_ConsolidatedBuffs", {
|
local BrokerConsolidatedBuffs = LDB:NewDataObject("Broker_ConsolidatedBuffs", {
|
||||||
type = "data source",
|
type = "data source",
|
||||||
text = "0/"..NUM_LE_RAID_BUFF_TYPES,
|
text = "0/"..NUM_LE_RAID_BUFF_TYPES,
|
||||||
value = "0/"..NUM_LE_RAID_BUFF_TYPES,
|
value = "0/"..NUM_LE_RAID_BUFF_TYPES,
|
||||||
|
@ -78,11 +119,11 @@ local BrokerConsolidatedBuffs = ldb:NewDataObject("Broker_ConsolidatedBuffs", {
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local list = classColorLocalized(defaults[i][2][1])
|
local classes = ""
|
||||||
for ii = 2, #defaults[i][2] do
|
for ii = 1, #defaults[i][2] do
|
||||||
list = list ..", ".. classColorLocalized(defaults[i][2][ii])
|
classes = classes ..", ".. classColorLocalized(defaults[i][2][ii][2], defaults[i][2][ii][1])
|
||||||
end
|
end
|
||||||
tooltip:AddDoubleLine("\124T"..defaults[i][1]..":0\124t \124c"..c.._G["RAID_BUFF_"..i].."\124r", list)
|
tooltip:AddDoubleLine("\124T"..defaults[i][1]..":0\124t \124c"..c.._G["RAID_BUFF_"..i].."\124r", strsub(classes, 2))
|
||||||
--tooltip:AddLine("\124T"..defaults[i][1]..":0\124t \124c"..c.._G["RAID_BUFF_"..i].."\124r "..list)
|
--tooltip:AddLine("\124T"..defaults[i][1]..":0\124t \124c"..c.._G["RAID_BUFF_"..i].."\124r "..list)
|
||||||
--tooltip:AddLine(" "..list)
|
--tooltip:AddLine(" "..list)
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
libs\LibStub\LibStub.lua
|
libs\LibStub\LibStub.lua
|
||||||
libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
|
libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
|
||||||
libs\libdatabroker-1-1-1.1.4\LibDataBroker-1.1.lua
|
libs\libdatabroker-1-1-1.1.4\LibDataBroker-1.1.lua
|
||||||
|
libs\LibBabble-TalentTree-3.0\lib.xml
|
||||||
|
libs\LibBabble-CreatureType-3.0\lib.xml
|
||||||
|
|
||||||
Broker_ConsolidatedBuffs.lua
|
Broker_ConsolidatedBuffs.lua
|
||||||
|
|
||||||
|
@ -15,3 +17,5 @@ Broker_ConsolidatedBuffs.lua
|
||||||
# http://www.curse.com/addons/wow/broker_raidbuffs (inspiration)
|
# http://www.curse.com/addons/wow/broker_raidbuffs (inspiration)
|
||||||
# ElvUI modules/auras/consolidatedBuffs.lua
|
# ElvUI modules/auras/consolidatedBuffs.lua
|
||||||
# http://sethcoder.com/reference/wow/INTERFACE/BUTTONS/
|
# http://sethcoder.com/reference/wow/INTERFACE/BUTTONS/
|
||||||
|
# http://www.curse.com/addons/wow/libbabble-talenttree-3-0
|
||||||
|
# http://www.curse.com/addons/wow/libbabble-creaturetype-3-0
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
r144 | nevcairiel | 2014-11-02 10:31:31 +0000 (Sun, 02 Nov 2014) | 1 line
|
||||||
|
Changed paths:
|
||||||
|
A /tags/6.0-release3 (from /trunk:143)
|
||||||
|
|
||||||
|
Weekly Tag - #3
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
r143 | nevcairiel | 2014-11-02 10:31:00 +0000 (Sun, 02 Nov 2014) | 1 line
|
||||||
|
Changed paths:
|
||||||
|
M /trunk/LibBabble-CreatureType-3.0.lua
|
||||||
|
|
||||||
|
Automated LibBabble re-generation from the localization system
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
r141 | nevcairiel | 2014-10-23 11:52:30 +0000 (Thu, 23 Oct 2014) | 1 line
|
||||||
|
Changed paths:
|
||||||
|
M /trunk/LibBabble-CreatureType-3.0.lua
|
||||||
|
|
||||||
|
Automated LibBabble re-generation from the localization system
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
r139 | nevcairiel | 2014-10-14 19:01:14 +0000 (Tue, 14 Oct 2014) | 1 line
|
||||||
|
Changed paths:
|
||||||
|
M /trunk/LibBabble-CreatureType-3.0.lua
|
||||||
|
M /trunk/LibBabble-CreatureType-3.0.toc
|
||||||
|
|
||||||
|
Update for 6.0
|
||||||
|
------------------------------------------------------------------------
|
|
@ -0,0 +1,292 @@
|
||||||
|
-- LibBabble-3.0 is hereby placed in the Public Domain
|
||||||
|
-- Credits: ckknight
|
||||||
|
local LIBBABBLE_MAJOR, LIBBABBLE_MINOR = "LibBabble-3.0", 2
|
||||||
|
|
||||||
|
local LibBabble = LibStub:NewLibrary(LIBBABBLE_MAJOR, LIBBABBLE_MINOR)
|
||||||
|
if not LibBabble then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local data = LibBabble.data or {}
|
||||||
|
for k,v in pairs(LibBabble) do
|
||||||
|
LibBabble[k] = nil
|
||||||
|
end
|
||||||
|
LibBabble.data = data
|
||||||
|
|
||||||
|
local tablesToDB = {}
|
||||||
|
for namespace, db in pairs(data) do
|
||||||
|
for k,v in pairs(db) do
|
||||||
|
tablesToDB[v] = db
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function warn(message)
|
||||||
|
local _, ret = pcall(error, message, 3)
|
||||||
|
geterrorhandler()(ret)
|
||||||
|
end
|
||||||
|
|
||||||
|
local lookup_mt = { __index = function(self, key)
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
local current_key = db.current[key]
|
||||||
|
if current_key then
|
||||||
|
self[key] = current_key
|
||||||
|
return current_key
|
||||||
|
end
|
||||||
|
local base_key = db.base[key]
|
||||||
|
local real_MAJOR_VERSION
|
||||||
|
for k,v in pairs(data) do
|
||||||
|
if v == db then
|
||||||
|
real_MAJOR_VERSION = k
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not real_MAJOR_VERSION then
|
||||||
|
real_MAJOR_VERSION = LIBBABBLE_MAJOR
|
||||||
|
end
|
||||||
|
if base_key then
|
||||||
|
warn(("%s: Translation %q not found for locale %q"):format(real_MAJOR_VERSION, key, GetLocale()))
|
||||||
|
rawset(self, key, base_key)
|
||||||
|
return base_key
|
||||||
|
end
|
||||||
|
warn(("%s: Translation %q not found."):format(real_MAJOR_VERSION, key))
|
||||||
|
rawset(self, key, key)
|
||||||
|
return key
|
||||||
|
end }
|
||||||
|
|
||||||
|
local function initLookup(module, lookup)
|
||||||
|
local db = tablesToDB[module]
|
||||||
|
for k in pairs(lookup) do
|
||||||
|
lookup[k] = nil
|
||||||
|
end
|
||||||
|
setmetatable(lookup, lookup_mt)
|
||||||
|
tablesToDB[lookup] = db
|
||||||
|
db.lookup = lookup
|
||||||
|
return lookup
|
||||||
|
end
|
||||||
|
|
||||||
|
local function initReverse(module, reverse)
|
||||||
|
local db = tablesToDB[module]
|
||||||
|
for k in pairs(reverse) do
|
||||||
|
reverse[k] = nil
|
||||||
|
end
|
||||||
|
for k,v in pairs(db.current) do
|
||||||
|
reverse[v] = k
|
||||||
|
end
|
||||||
|
tablesToDB[reverse] = db
|
||||||
|
db.reverse = reverse
|
||||||
|
db.reverseIterators = nil
|
||||||
|
return reverse
|
||||||
|
end
|
||||||
|
|
||||||
|
local prototype = {}
|
||||||
|
local prototype_mt = {__index = prototype}
|
||||||
|
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Notes:
|
||||||
|
* If you try to access a nonexistent key, it will warn but allow the code to pass through.
|
||||||
|
Returns:
|
||||||
|
A lookup table for english to localized words.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
local BL = B:GetLookupTable()
|
||||||
|
assert(BL["Some english word"] == "Some localized word")
|
||||||
|
DoSomething(BL["Some english word that doesn't exist"]) -- warning!
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetLookupTable()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
local lookup = db.lookup
|
||||||
|
if lookup then
|
||||||
|
return lookup
|
||||||
|
end
|
||||||
|
return initLookup(self, {})
|
||||||
|
end
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Notes:
|
||||||
|
* If you try to access a nonexistent key, it will return nil.
|
||||||
|
Returns:
|
||||||
|
A lookup table for english to localized words.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
local B_has = B:GetUnstrictLookupTable()
|
||||||
|
assert(B_has["Some english word"] == "Some localized word")
|
||||||
|
assert(B_has["Some english word that doesn't exist"] == nil)
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetUnstrictLookupTable()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
return db.current
|
||||||
|
end
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Notes:
|
||||||
|
* If you try to access a nonexistent key, it will return nil.
|
||||||
|
* This is useful for checking if the base (English) table has a key, even if the localized one does not have it registered.
|
||||||
|
Returns:
|
||||||
|
A lookup table for english to localized words.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
local B_hasBase = B:GetBaseLookupTable()
|
||||||
|
assert(B_hasBase["Some english word"] == "Some english word")
|
||||||
|
assert(B_hasBase["Some english word that doesn't exist"] == nil)
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetBaseLookupTable()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
return db.base
|
||||||
|
end
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Notes:
|
||||||
|
* If you try to access a nonexistent key, it will return nil.
|
||||||
|
* This will return only one English word that it maps to, if there are more than one to check, see :GetReverseIterator("word")
|
||||||
|
Returns:
|
||||||
|
A lookup table for localized to english words.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
local BR = B:GetReverseLookupTable()
|
||||||
|
assert(BR["Some localized word"] == "Some english word")
|
||||||
|
assert(BR["Some localized word that doesn't exist"] == nil)
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetReverseLookupTable()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
local reverse = db.reverse
|
||||||
|
if reverse then
|
||||||
|
return reverse
|
||||||
|
end
|
||||||
|
return initReverse(self, {})
|
||||||
|
end
|
||||||
|
local blank = {}
|
||||||
|
local weakVal = {__mode='v'}
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Arguments:
|
||||||
|
string - the localized word to chek for.
|
||||||
|
Returns:
|
||||||
|
An iterator to traverse all English words that map to the given key
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
for word in B:GetReverseIterator("Some localized word") do
|
||||||
|
DoSomething(word)
|
||||||
|
end
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetReverseIterator(key)
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
local reverseIterators = db.reverseIterators
|
||||||
|
if not reverseIterators then
|
||||||
|
reverseIterators = setmetatable({}, weakVal)
|
||||||
|
db.reverseIterators = reverseIterators
|
||||||
|
elseif reverseIterators[key] then
|
||||||
|
return pairs(reverseIterators[key])
|
||||||
|
end
|
||||||
|
local t
|
||||||
|
for k,v in pairs(db.current) do
|
||||||
|
if v == key then
|
||||||
|
if not t then
|
||||||
|
t = {}
|
||||||
|
end
|
||||||
|
t[k] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
reverseIterators[key] = t or blank
|
||||||
|
return pairs(reverseIterators[key])
|
||||||
|
end
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Returns:
|
||||||
|
An iterator to traverse all translations English to localized.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
for english, localized in B:Iterate() do
|
||||||
|
DoSomething(english, localized)
|
||||||
|
end
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:Iterate()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
return pairs(db.current)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- #NODOC
|
||||||
|
-- modules need to call this to set the base table
|
||||||
|
function prototype:SetBaseTranslations(base)
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
local oldBase = db.base
|
||||||
|
if oldBase then
|
||||||
|
for k in pairs(oldBase) do
|
||||||
|
oldBase[k] = nil
|
||||||
|
end
|
||||||
|
for k, v in pairs(base) do
|
||||||
|
oldBase[k] = v
|
||||||
|
end
|
||||||
|
base = oldBase
|
||||||
|
else
|
||||||
|
db.base = base
|
||||||
|
end
|
||||||
|
for k,v in pairs(base) do
|
||||||
|
if v == true then
|
||||||
|
base[k] = k
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function init(module)
|
||||||
|
local db = tablesToDB[module]
|
||||||
|
if db.lookup then
|
||||||
|
initLookup(module, db.lookup)
|
||||||
|
end
|
||||||
|
if db.reverse then
|
||||||
|
initReverse(module, db.reverse)
|
||||||
|
end
|
||||||
|
db.reverseIterators = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- #NODOC
|
||||||
|
-- modules need to call this to set the current table. if current is true, use the base table.
|
||||||
|
function prototype:SetCurrentTranslations(current)
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
if current == true then
|
||||||
|
db.current = db.base
|
||||||
|
else
|
||||||
|
local oldCurrent = db.current
|
||||||
|
if oldCurrent then
|
||||||
|
for k in pairs(oldCurrent) do
|
||||||
|
oldCurrent[k] = nil
|
||||||
|
end
|
||||||
|
for k, v in pairs(current) do
|
||||||
|
oldCurrent[k] = v
|
||||||
|
end
|
||||||
|
current = oldCurrent
|
||||||
|
else
|
||||||
|
db.current = current
|
||||||
|
end
|
||||||
|
end
|
||||||
|
init(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
for namespace, db in pairs(data) do
|
||||||
|
setmetatable(db.module, prototype_mt)
|
||||||
|
init(db.module)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- #NODOC
|
||||||
|
-- modules need to call this to create a new namespace.
|
||||||
|
function LibBabble:New(namespace, minor)
|
||||||
|
local module, oldminor = LibStub:NewLibrary(namespace, minor)
|
||||||
|
if not module then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not oldminor then
|
||||||
|
local db = {
|
||||||
|
module = module,
|
||||||
|
}
|
||||||
|
data[namespace] = db
|
||||||
|
tablesToDB[module] = db
|
||||||
|
else
|
||||||
|
for k,v in pairs(module) do
|
||||||
|
module[k] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
setmetatable(module, prototype_mt)
|
||||||
|
|
||||||
|
return module
|
||||||
|
end
|
|
@ -0,0 +1,938 @@
|
||||||
|
--[[
|
||||||
|
Name: LibBabble-CreatureType-3.0
|
||||||
|
Revision: $Rev: 143 $
|
||||||
|
Maintainers: ckknight, nevcairiel, Ackis
|
||||||
|
Website: http://www.wowace.com/projects/libbabble-creaturetype-3-0/
|
||||||
|
Dependencies: None
|
||||||
|
License: MIT
|
||||||
|
]]
|
||||||
|
|
||||||
|
local MAJOR_VERSION = "LibBabble-CreatureType-3.0"
|
||||||
|
local MINOR_VERSION = 90000 + tonumber(("$Rev: 143 $"):match("%d+"))
|
||||||
|
|
||||||
|
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
|
||||||
|
local lib = LibStub("LibBabble-3.0"):New(MAJOR_VERSION, MINOR_VERSION)
|
||||||
|
if not lib then return end
|
||||||
|
|
||||||
|
local GAME_LOCALE = GetLocale()
|
||||||
|
|
||||||
|
lib:SetBaseTranslations {
|
||||||
|
Aberration = "Aberration",
|
||||||
|
Abyssal = "Abyssal",
|
||||||
|
Basilisk = "Basilisk",
|
||||||
|
Bat = "Bat",
|
||||||
|
Bear = "Bear",
|
||||||
|
Beast = "Beast",
|
||||||
|
Beetle = "Beetle",
|
||||||
|
["Bird of Prey"] = "Bird of Prey",
|
||||||
|
Boar = "Boar",
|
||||||
|
["Carrion Bird"] = "Carrion Bird",
|
||||||
|
Cat = "Cat",
|
||||||
|
Chimaera = "Chimaera",
|
||||||
|
Clefthoof = "Clefthoof",
|
||||||
|
["Core Hound"] = "Core Hound",
|
||||||
|
Crab = "Crab",
|
||||||
|
Crane = "Crane",
|
||||||
|
Critter = "Critter",
|
||||||
|
Crocolisk = "Crocolisk",
|
||||||
|
Demon = "Demon",
|
||||||
|
Devilsaur = "Devilsaur",
|
||||||
|
Direhorn = "Direhorn",
|
||||||
|
Dog = "Dog",
|
||||||
|
Doomguard = "Doomguard",
|
||||||
|
Dragonhawk = "Dragonhawk",
|
||||||
|
Dragonkin = "Dragonkin",
|
||||||
|
Elemental = "Elemental",
|
||||||
|
Felguard = "Felguard",
|
||||||
|
Felhunter = "Felhunter",
|
||||||
|
["Fel Imp"] = "Fel Imp",
|
||||||
|
Fox = "Fox",
|
||||||
|
["Gas Cloud"] = "Gas Cloud",
|
||||||
|
Ghoul = "Ghoul",
|
||||||
|
Giant = "Giant",
|
||||||
|
Goat = "Goat",
|
||||||
|
Gorilla = "Gorilla",
|
||||||
|
Humanoid = "Humanoid",
|
||||||
|
Hydra = "Hydra",
|
||||||
|
Hyena = "Hyena",
|
||||||
|
Imp = "Imp",
|
||||||
|
Mechanical = "Mechanical",
|
||||||
|
Monkey = "Monkey",
|
||||||
|
Moth = "Moth",
|
||||||
|
["Nether Ray"] = "Nether Ray",
|
||||||
|
["Non-combat Pet"] = "Non-combat Pet",
|
||||||
|
["Not specified"] = "Not specified",
|
||||||
|
Observer = "Observer",
|
||||||
|
Porcupine = "Porcupine",
|
||||||
|
Quilen = "Quilen",
|
||||||
|
Raptor = "Raptor",
|
||||||
|
Ravager = "Ravager",
|
||||||
|
["Remote Control"] = "Remote Control",
|
||||||
|
Rhino = "Rhino",
|
||||||
|
Riverbeast = "Riverbeast",
|
||||||
|
Rylak = "Rylak",
|
||||||
|
Scorpid = "Scorpid",
|
||||||
|
Serpent = "Serpent",
|
||||||
|
["Shale Spider"] = "Shale Spider",
|
||||||
|
Shivarra = "Shivarra",
|
||||||
|
Silithid = "Silithid",
|
||||||
|
Spider = "Spider",
|
||||||
|
["Spirit Beast"] = "Spirit Beast",
|
||||||
|
Sporebat = "Sporebat",
|
||||||
|
Stag = "Stag",
|
||||||
|
Succubus = "Succubus",
|
||||||
|
Tallstrider = "Tallstrider",
|
||||||
|
Terrorguard = "Terrorguard",
|
||||||
|
Totem = "Totem",
|
||||||
|
Turtle = "Turtle",
|
||||||
|
Undead = "Undead",
|
||||||
|
Voidlord = "Voidlord",
|
||||||
|
Voidwalker = "Voidwalker",
|
||||||
|
["Warp Stalker"] = "Warp Stalker",
|
||||||
|
Wasp = "Wasp",
|
||||||
|
["Water Elemental"] = "Water Elemental",
|
||||||
|
["Water Strider"] = "Water Strider",
|
||||||
|
["Wild Pet"] = "Wild Pet",
|
||||||
|
["Wind Serpent"] = "Wind Serpent",
|
||||||
|
Wolf = "Wolf",
|
||||||
|
Worm = "Worm",
|
||||||
|
Wrathguard = "Wrathguard",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if GAME_LOCALE == "enUS" then
|
||||||
|
lib:SetCurrentTranslations(true)
|
||||||
|
elseif GAME_LOCALE == "deDE" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
-- Aberration = "",
|
||||||
|
Abyssal = "Abyssal", -- Needs review
|
||||||
|
Basilisk = "Basilisk",
|
||||||
|
Bat = "Fledermaus",
|
||||||
|
Bear = "Bär",
|
||||||
|
Beast = "Wildtier",
|
||||||
|
Beetle = "Käfer",
|
||||||
|
["Bird of Prey"] = "Raubvogel",
|
||||||
|
Boar = "Eber",
|
||||||
|
["Carrion Bird"] = "Aasvogel",
|
||||||
|
Cat = "Katze",
|
||||||
|
Chimaera = "Schimäre",
|
||||||
|
Clefthoof = "Grollhuf", -- Needs review
|
||||||
|
["Core Hound"] = "Kernhund",
|
||||||
|
Crab = "Krebs",
|
||||||
|
Crane = "Kranich",
|
||||||
|
Critter = "Kleintier",
|
||||||
|
Crocolisk = "Krokilisk",
|
||||||
|
Demon = "Dämon",
|
||||||
|
Devilsaur = "Teufelssaurier",
|
||||||
|
Direhorn = "Terrorhorn", -- Needs review
|
||||||
|
Dog = "Hund",
|
||||||
|
Doomguard = "Verdammniswache",
|
||||||
|
Dragonhawk = "Drachenfalke",
|
||||||
|
Dragonkin = "Drachkin",
|
||||||
|
Elemental = "Elementar",
|
||||||
|
Felguard = "Teufelswache",
|
||||||
|
Felhunter = "Teufelsjäger",
|
||||||
|
["Fel Imp"] = "Teufelswichtel", -- Needs review
|
||||||
|
Fox = "Fuchs",
|
||||||
|
["Gas Cloud"] = "Gaswolke",
|
||||||
|
Ghoul = "Ghul",
|
||||||
|
Giant = "Riese",
|
||||||
|
Goat = "Ziege",
|
||||||
|
Gorilla = "Gorilla",
|
||||||
|
Humanoid = "Humanoid",
|
||||||
|
Hydra = "Hydra", -- Needs review
|
||||||
|
Hyena = "Hyäne",
|
||||||
|
Imp = "Wichtel",
|
||||||
|
Mechanical = "Mechanisch",
|
||||||
|
Monkey = "Affe",
|
||||||
|
Moth = "Motte",
|
||||||
|
["Nether Ray"] = "Netherrochen",
|
||||||
|
["Non-combat Pet"] = "Haustier",
|
||||||
|
["Not specified"] = "Nicht spezifiziert",
|
||||||
|
Observer = "Beobachter", -- Needs review
|
||||||
|
Porcupine = "Stachelschwein",
|
||||||
|
Quilen = "Qilen",
|
||||||
|
Raptor = "Raptor",
|
||||||
|
Ravager = "Felshetzer",
|
||||||
|
["Remote Control"] = "Ferngesteuert",
|
||||||
|
Rhino = "Rhinozeros",
|
||||||
|
Riverbeast = "Flussbestie", -- Needs review
|
||||||
|
Rylak = "Rylak", -- Needs review
|
||||||
|
Scorpid = "Skorpid",
|
||||||
|
Serpent = "Schlange",
|
||||||
|
["Shale Spider"] = "Shale Spider",
|
||||||
|
Shivarra = "Shivarra", -- Needs review
|
||||||
|
Silithid = "Silithid",
|
||||||
|
Spider = "Spinne",
|
||||||
|
["Spirit Beast"] = "Geisterbestie",
|
||||||
|
Sporebat = "Sporensegler",
|
||||||
|
Stag = "Hirsch", -- Needs review
|
||||||
|
Succubus = "Sukkubus",
|
||||||
|
Tallstrider = "Weitschreiter",
|
||||||
|
Terrorguard = "Terrorwache", -- Needs review
|
||||||
|
Totem = "Totem",
|
||||||
|
Turtle = "Schildkröte",
|
||||||
|
Undead = "Untoter",
|
||||||
|
Voidlord = "Leerenfürst", -- Needs review
|
||||||
|
Voidwalker = "Leerwandler",
|
||||||
|
["Warp Stalker"] = "Sphärenjäger",
|
||||||
|
Wasp = "Wespe",
|
||||||
|
["Water Elemental"] = "Wasserelementar",
|
||||||
|
["Water Strider"] = "Wasserschreiter",
|
||||||
|
["Wild Pet"] = "Ungezähmtes Tier",
|
||||||
|
["Wind Serpent"] = "Windnatter",
|
||||||
|
Wolf = "Wolf",
|
||||||
|
Worm = "Wurm",
|
||||||
|
Wrathguard = "Zornwächter", -- Needs review
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "frFR" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Aberration = "Aberration", -- Needs review
|
||||||
|
Abyssal = "Abyssal", -- Needs review
|
||||||
|
Basilisk = "Basilic", -- Needs review
|
||||||
|
Bat = "Chauve-souris",
|
||||||
|
Bear = "Ours",
|
||||||
|
Beast = "Bête",
|
||||||
|
Beetle = "Hanneton",
|
||||||
|
["Bird of Prey"] = "Oiseau de proie",
|
||||||
|
Boar = "Sanglier",
|
||||||
|
["Carrion Bird"] = "Charognard",
|
||||||
|
Cat = "Félin",
|
||||||
|
Chimaera = "Chimère",
|
||||||
|
Clefthoof = "Sabot-fourchu", -- Needs review
|
||||||
|
["Core Hound"] = "Chien du Magma",
|
||||||
|
Crab = "Crabe",
|
||||||
|
Crane = "Grue", -- Needs review
|
||||||
|
Critter = "Bestiole",
|
||||||
|
Crocolisk = "Crocilisque",
|
||||||
|
Demon = "Démon",
|
||||||
|
Devilsaur = "Diablosaure",
|
||||||
|
Direhorn = "Navrecorne", -- Needs review
|
||||||
|
Dog = "Chien",
|
||||||
|
Doomguard = "Garde funeste",
|
||||||
|
Dragonhawk = "Faucon-dragon",
|
||||||
|
Dragonkin = "Draconien",
|
||||||
|
Elemental = "Elémentaire",
|
||||||
|
Felguard = "Gangregarde",
|
||||||
|
Felhunter = "Chasseur corrompu",
|
||||||
|
["Fel Imp"] = "Diablotin gangrené", -- Needs review
|
||||||
|
Fox = "Renard",
|
||||||
|
["Gas Cloud"] = "Nuage de gaz",
|
||||||
|
Ghoul = "Goule",
|
||||||
|
Giant = "Géant",
|
||||||
|
Goat = "Chèvre", -- Needs review
|
||||||
|
Gorilla = "Gorille",
|
||||||
|
Humanoid = "Humanoïde",
|
||||||
|
Hydra = "Hydre", -- Needs review
|
||||||
|
Hyena = "Hyène",
|
||||||
|
Imp = "Diablotin",
|
||||||
|
Mechanical = "Machine",
|
||||||
|
Monkey = "Singe",
|
||||||
|
Moth = "Phalène",
|
||||||
|
["Nether Ray"] = "Raie du Néant",
|
||||||
|
["Non-combat Pet"] = "Familier pacifique",
|
||||||
|
["Not specified"] = "Non spécifié",
|
||||||
|
Observer = "Observateur", -- Needs review
|
||||||
|
Porcupine = "Porc-épic", -- Needs review
|
||||||
|
Quilen = "Quilen", -- Needs review
|
||||||
|
Raptor = "Raptor",
|
||||||
|
Ravager = "Ravageur",
|
||||||
|
["Remote Control"] = "Télécommande",
|
||||||
|
Rhino = "Rhinocéros",
|
||||||
|
Riverbeast = "Potamodonte", -- Needs review
|
||||||
|
Rylak = "Rylak", -- Needs review
|
||||||
|
Scorpid = "Scorpide",
|
||||||
|
Serpent = "Serpent",
|
||||||
|
["Shale Spider"] = "Shale Spider",
|
||||||
|
Shivarra = "Shivarra", -- Needs review
|
||||||
|
Silithid = "Silithide",
|
||||||
|
Spider = "Araignée",
|
||||||
|
["Spirit Beast"] = "Esprit de bête",
|
||||||
|
Sporebat = "Sporoptère",
|
||||||
|
Stag = "Cerf", -- Needs review
|
||||||
|
Succubus = "Succube",
|
||||||
|
Tallstrider = "Haut-trotteur",
|
||||||
|
Terrorguard = "Garde de terreur", -- Needs review
|
||||||
|
Totem = "Totem",
|
||||||
|
Turtle = "Tortue",
|
||||||
|
Undead = "Mort-vivant",
|
||||||
|
Voidlord = "Seigneur du Vide", -- Needs review
|
||||||
|
Voidwalker = "Marcheur du Vide",
|
||||||
|
["Warp Stalker"] = "Traqueur dim.",
|
||||||
|
Wasp = "Guêpe",
|
||||||
|
["Water Elemental"] = "Elémentaire d'eau",
|
||||||
|
["Water Strider"] = "Trotteur aquatique", -- Needs review
|
||||||
|
["Wild Pet"] = "Mascotte sauvage", -- Needs review
|
||||||
|
["Wind Serpent"] = "Serpent des vents",
|
||||||
|
Wolf = "Loup",
|
||||||
|
Worm = "Ver",
|
||||||
|
Wrathguard = "Garde-courroux", -- Needs review
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "koKR" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
-- Aberration = "",
|
||||||
|
-- Abyssal = "",
|
||||||
|
-- Basilisk = "",
|
||||||
|
Bat = "박쥐",
|
||||||
|
Bear = "곰",
|
||||||
|
Beast = "야수",
|
||||||
|
Beetle = "딱정벌레",
|
||||||
|
["Bird of Prey"] = "맹금",
|
||||||
|
Boar = "멧돼지",
|
||||||
|
["Carrion Bird"] = "독수리",
|
||||||
|
Cat = "살쾡이",
|
||||||
|
Chimaera = "키메라",
|
||||||
|
-- Clefthoof = "",
|
||||||
|
["Core Hound"] = "심장부 사냥개",
|
||||||
|
Crab = "게",
|
||||||
|
-- Crane = "",
|
||||||
|
Critter = "동물",
|
||||||
|
Crocolisk = "악어",
|
||||||
|
Demon = "악마",
|
||||||
|
Devilsaur = "데빌사우루스",
|
||||||
|
-- Direhorn = "",
|
||||||
|
Dog = "개",
|
||||||
|
Doomguard = "파멸의 수호병",
|
||||||
|
Dragonhawk = "용매",
|
||||||
|
Dragonkin = "용족",
|
||||||
|
Elemental = "정령",
|
||||||
|
Felguard = "지옥수호병",
|
||||||
|
Felhunter = "지옥사냥개",
|
||||||
|
-- ["Fel Imp"] = "",
|
||||||
|
Fox = "여우",
|
||||||
|
["Gas Cloud"] = "가스",
|
||||||
|
Ghoul = "구울",
|
||||||
|
Giant = "거인",
|
||||||
|
-- Goat = "",
|
||||||
|
Gorilla = "고릴라",
|
||||||
|
Humanoid = "인간형",
|
||||||
|
-- Hydra = "",
|
||||||
|
Hyena = "하이에나",
|
||||||
|
Imp = "임프",
|
||||||
|
Mechanical = "기계",
|
||||||
|
Monkey = "원숭이",
|
||||||
|
Moth = "나방",
|
||||||
|
["Nether Ray"] = "황천의 가오리",
|
||||||
|
["Non-combat Pet"] = "애완동물",
|
||||||
|
["Not specified"] = "기타",
|
||||||
|
-- Observer = "",
|
||||||
|
-- Porcupine = "",
|
||||||
|
-- Quilen = "",
|
||||||
|
Raptor = "랩터",
|
||||||
|
Ravager = "칼날발톱",
|
||||||
|
["Remote Control"] = "무선조종 장난감",
|
||||||
|
Rhino = "코뿔소",
|
||||||
|
-- Riverbeast = "",
|
||||||
|
-- Rylak = "",
|
||||||
|
Scorpid = "전갈",
|
||||||
|
Serpent = "뱀",
|
||||||
|
["Shale Spider"] = "혈암 거미",
|
||||||
|
-- Shivarra = "",
|
||||||
|
Silithid = "실리시드",
|
||||||
|
Spider = "거미",
|
||||||
|
["Spirit Beast"] = "야수 정령",
|
||||||
|
Sporebat = "포자날개",
|
||||||
|
-- Stag = "",
|
||||||
|
Succubus = "서큐버스",
|
||||||
|
Tallstrider = "타조",
|
||||||
|
-- Terrorguard = "",
|
||||||
|
Totem = "토템",
|
||||||
|
Turtle = "거북",
|
||||||
|
Undead = "언데드",
|
||||||
|
-- Voidlord = "",
|
||||||
|
Voidwalker = "보이드워커",
|
||||||
|
["Warp Stalker"] = "차원의 추적자",
|
||||||
|
Wasp = "말벌",
|
||||||
|
["Water Elemental"] = "물 정령",
|
||||||
|
-- ["Water Strider"] = "",
|
||||||
|
-- ["Wild Pet"] = "",
|
||||||
|
["Wind Serpent"] = "천둥매",
|
||||||
|
Wolf = "늑대",
|
||||||
|
Worm = "벌레",
|
||||||
|
-- Wrathguard = "",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "esES" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
-- Aberration = "",
|
||||||
|
Abyssal = "Abisal", -- Needs review
|
||||||
|
Basilisk = "Basilisco", -- Needs review
|
||||||
|
Bat = "Murciélago",
|
||||||
|
Bear = "Oso",
|
||||||
|
Beast = "Bestia",
|
||||||
|
Beetle = "Alfazaque",
|
||||||
|
["Bird of Prey"] = "Ave rapaz",
|
||||||
|
Boar = "Jabalí",
|
||||||
|
["Carrion Bird"] = "Carroñero",
|
||||||
|
Cat = "Felino",
|
||||||
|
Chimaera = "Quimera",
|
||||||
|
Clefthoof = "Uñagrieta", -- Needs review
|
||||||
|
["Core Hound"] = "Can del Núcleo",
|
||||||
|
Crab = "Cangrejo",
|
||||||
|
Crane = "Grulla", -- Needs review
|
||||||
|
Critter = "Alma",
|
||||||
|
Crocolisk = "Crocolisco",
|
||||||
|
Demon = "Demonio",
|
||||||
|
Devilsaur = "Demosaurio",
|
||||||
|
Direhorn = "Cuernoatroz", -- Needs review
|
||||||
|
Dog = "Perro",
|
||||||
|
Doomguard = "Guardia apocalíptico",
|
||||||
|
Dragonhawk = "Dracohalcón",
|
||||||
|
Dragonkin = "Dragón",
|
||||||
|
Elemental = "Elemental",
|
||||||
|
Felguard = "Guardia vil",
|
||||||
|
Felhunter = "Manáfago",
|
||||||
|
["Fel Imp"] = "Diablillo vil", -- Needs review
|
||||||
|
Fox = "Zorro",
|
||||||
|
["Gas Cloud"] = "Nube de Gas",
|
||||||
|
Ghoul = "Necrófago",
|
||||||
|
Giant = "Gigante",
|
||||||
|
Goat = "Cabra", -- Needs review
|
||||||
|
Gorilla = "Gorila",
|
||||||
|
Humanoid = "Humanoide",
|
||||||
|
Hydra = "Hidra", -- Needs review
|
||||||
|
Hyena = "Hiena",
|
||||||
|
Imp = "Diablillo",
|
||||||
|
Mechanical = "Mecánico",
|
||||||
|
Monkey = "Mono",
|
||||||
|
Moth = "Palomilla",
|
||||||
|
["Nether Ray"] = "Raya abisal",
|
||||||
|
["Non-combat Pet"] = "Mascota no combatiente",
|
||||||
|
["Not specified"] = "No especificado",
|
||||||
|
Observer = "Observador", -- Needs review
|
||||||
|
Porcupine = "Puercoespín", -- Needs review
|
||||||
|
Quilen = "Quilen", -- Needs review
|
||||||
|
Raptor = "Raptor",
|
||||||
|
Ravager = "Devastador",
|
||||||
|
["Remote Control"] = "Control remoto",
|
||||||
|
Rhino = "Rinoceronte",
|
||||||
|
Riverbeast = "Bestia fluvial", -- Needs review
|
||||||
|
Rylak = "Rylak", -- Needs review
|
||||||
|
Scorpid = "Escórpido",
|
||||||
|
Serpent = "Serpiente",
|
||||||
|
["Shale Spider"] = "Shale Spider",
|
||||||
|
Shivarra = "Shivarra", -- Needs review
|
||||||
|
Silithid = "Silítido",
|
||||||
|
Spider = "Araña",
|
||||||
|
["Spirit Beast"] = "Bestia espíritu",
|
||||||
|
Sporebat = "Esporiélago",
|
||||||
|
Stag = "Venado", -- Needs review
|
||||||
|
Succubus = "Súcubo",
|
||||||
|
Tallstrider = "Zancaalta",
|
||||||
|
Terrorguard = "Guarda terrorífico", -- Needs review
|
||||||
|
Totem = "Tótem",
|
||||||
|
Turtle = "Tortuga",
|
||||||
|
Undead = "No-muerto",
|
||||||
|
Voidlord = "Señor del vacío", -- Needs review
|
||||||
|
Voidwalker = "Abisario",
|
||||||
|
["Warp Stalker"] = "Acechador deformado",
|
||||||
|
Wasp = "Avispa",
|
||||||
|
["Water Elemental"] = "Elemental de agua",
|
||||||
|
["Water Strider"] = "Zancudo acuático", -- Needs review
|
||||||
|
["Wild Pet"] = "Mascota salvaje", -- Needs review
|
||||||
|
["Wind Serpent"] = "Serpiente alada",
|
||||||
|
Wolf = "Lobo",
|
||||||
|
Worm = "Gusano",
|
||||||
|
Wrathguard = "Guardia de cólera", -- Needs review
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "esMX" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Aberration = "Aberración", -- Needs review
|
||||||
|
Abyssal = "Abisal",
|
||||||
|
Basilisk = "Basilisco",
|
||||||
|
Bat = "Murciélago",
|
||||||
|
Bear = "Oso",
|
||||||
|
Beast = "Bestia",
|
||||||
|
Beetle = "Alfazaque",
|
||||||
|
["Bird of Prey"] = "Ave rapaz",
|
||||||
|
Boar = "Jabalí",
|
||||||
|
["Carrion Bird"] = "Carroñero",
|
||||||
|
Cat = "Felino",
|
||||||
|
Chimaera = "Quimera",
|
||||||
|
Clefthoof = "Uñagrieta",
|
||||||
|
["Core Hound"] = "Can del Núcleo",
|
||||||
|
Crab = "Cangrejo",
|
||||||
|
Crane = "Grulla",
|
||||||
|
Critter = "Alma",
|
||||||
|
Crocolisk = "Crocolisco",
|
||||||
|
Demon = "Demonio",
|
||||||
|
Devilsaur = "Demosaurio",
|
||||||
|
Direhorn = "Cuernoatroz",
|
||||||
|
Dog = "Perro",
|
||||||
|
Doomguard = "Guardia apocalíptico",
|
||||||
|
Dragonhawk = "Dracohalcón",
|
||||||
|
Dragonkin = "Dragon",
|
||||||
|
Elemental = "Elemental",
|
||||||
|
Felguard = "Guardia vil",
|
||||||
|
Felhunter = "Manáfago",
|
||||||
|
["Fel Imp"] = "Diablillo vil",
|
||||||
|
Fox = "Zorro",
|
||||||
|
["Gas Cloud"] = "Nube de Gas",
|
||||||
|
Ghoul = "Necrófago",
|
||||||
|
Giant = "Gigante",
|
||||||
|
Goat = "Cabra",
|
||||||
|
Gorilla = "Gorila",
|
||||||
|
Humanoid = "Humanoide",
|
||||||
|
Hydra = "Hidra",
|
||||||
|
Hyena = "Hiena",
|
||||||
|
Imp = "Diablillo",
|
||||||
|
Mechanical = "Mecánico",
|
||||||
|
Monkey = "Mono",
|
||||||
|
Moth = "Palomilla",
|
||||||
|
["Nether Ray"] = "Raya abisal",
|
||||||
|
["Non-combat Pet"] = "Mascota mansa",
|
||||||
|
["Not specified"] = "Sin especificar",
|
||||||
|
Observer = "Observador",
|
||||||
|
Porcupine = "Puercoespín",
|
||||||
|
Quilen = "Quilen",
|
||||||
|
Raptor = "Raptor",
|
||||||
|
Ravager = "Devastador",
|
||||||
|
["Remote Control"] = "Control remoto",
|
||||||
|
Rhino = "Rinoceronte",
|
||||||
|
Riverbeast = "Bestia fluvial",
|
||||||
|
Rylak = "Rylak",
|
||||||
|
Scorpid = "Escórpido",
|
||||||
|
Serpent = "Serpiente",
|
||||||
|
["Shale Spider"] = "Shale Spider",
|
||||||
|
Shivarra = "Shivarra",
|
||||||
|
Silithid = "Silítido",
|
||||||
|
Spider = "Araña",
|
||||||
|
["Spirit Beast"] = "Bestia espíritu",
|
||||||
|
Sporebat = "Esporiélago",
|
||||||
|
Stag = "Venado",
|
||||||
|
Succubus = "Súcubo",
|
||||||
|
Tallstrider = "Zancaalta",
|
||||||
|
Terrorguard = "Guarda terrorífico",
|
||||||
|
Totem = "Totém",
|
||||||
|
Turtle = "Tortuga",
|
||||||
|
Undead = "No-muerto",
|
||||||
|
Voidlord = "Señor del vacío",
|
||||||
|
Voidwalker = "Abisario",
|
||||||
|
["Warp Stalker"] = "Acechador deformado",
|
||||||
|
Wasp = "Avispa",
|
||||||
|
["Water Elemental"] = "Elemental de agua",
|
||||||
|
["Water Strider"] = "Zancudo acuático",
|
||||||
|
["Wild Pet"] = "Mascóta Salvaje", -- Needs review
|
||||||
|
["Wind Serpent"] = "Serpiente alada",
|
||||||
|
Wolf = "Lobo",
|
||||||
|
Worm = "Gusano",
|
||||||
|
Wrathguard = "Guardia de cólera",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "ptBR" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
-- Aberration = "",
|
||||||
|
Abyssal = "Abissal", -- Needs review
|
||||||
|
Basilisk = "Basilisco", -- Needs review
|
||||||
|
Bat = "Morcego", -- Needs review
|
||||||
|
Bear = "Urso", -- Needs review
|
||||||
|
Beast = "Fera", -- Needs review
|
||||||
|
Beetle = "Abelha", -- Needs review
|
||||||
|
["Bird of Prey"] = "Ave de Rapina", -- Needs review
|
||||||
|
Boar = "Javali", -- Needs review
|
||||||
|
["Carrion Bird"] = "Pássaro Carniçeiro", -- Needs review
|
||||||
|
Cat = "Gato", -- Needs review
|
||||||
|
Chimaera = "Quimera", -- Needs review
|
||||||
|
Clefthoof = "Fenoceronte", -- Needs review
|
||||||
|
["Core Hound"] = "Cão Feroz", -- Needs review
|
||||||
|
Crab = "Carangueijo", -- Needs review
|
||||||
|
Crane = "Garça", -- Needs review
|
||||||
|
Critter = "Bicho", -- Needs review
|
||||||
|
Crocolisk = "Crocodilo", -- Needs review
|
||||||
|
Demon = "Demônio", -- Needs review
|
||||||
|
Devilsaur = "Dinomau", -- Needs review
|
||||||
|
Direhorn = "Escornante", -- Needs review
|
||||||
|
Dog = "Cachorro", -- Needs review
|
||||||
|
Doomguard = "Demonarca", -- Needs review
|
||||||
|
Dragonhawk = "Falcão Dracônico", -- Needs review
|
||||||
|
Dragonkin = "Dracônico", -- Needs review
|
||||||
|
Elemental = "Elemental", -- Needs review
|
||||||
|
Felguard = "Guarda Vil", -- Needs review
|
||||||
|
Felhunter = "Caçador Vil", -- Needs review
|
||||||
|
["Fel Imp"] = "Diabrete Vil", -- Needs review
|
||||||
|
Fox = "Raposa", -- Needs review
|
||||||
|
["Gas Cloud"] = "Gasoso", -- Needs review
|
||||||
|
Ghoul = "Vampiro", -- Needs review
|
||||||
|
Giant = "Gigante", -- Needs review
|
||||||
|
Goat = "Bode", -- Needs review
|
||||||
|
Gorilla = "Gorila", -- Needs review
|
||||||
|
Humanoid = "Humanoide", -- Needs review
|
||||||
|
Hydra = "Hidra", -- Needs review
|
||||||
|
Hyena = "Hiena", -- Needs review
|
||||||
|
Imp = "Diabinho", -- Needs review
|
||||||
|
Mechanical = "Mecânico", -- Needs review
|
||||||
|
Monkey = "Macaco", -- Needs review
|
||||||
|
Moth = "Mariposa", -- Needs review
|
||||||
|
["Nether Ray"] = "Raio Etéreo", -- Needs review
|
||||||
|
["Non-combat Pet"] = "Mascote não-combatente", -- Needs review
|
||||||
|
["Not specified"] = "Não especificado", -- Needs review
|
||||||
|
Observer = "Observador", -- Needs review
|
||||||
|
Porcupine = "Porco-espinho", -- Needs review
|
||||||
|
Quilen = "Quílen", -- Needs review
|
||||||
|
Raptor = "Raptor", -- Needs review
|
||||||
|
Ravager = "Devastador", -- Needs review
|
||||||
|
["Remote Control"] = "Controle Remoto", -- Needs review
|
||||||
|
Rhino = "Rinoceronte", -- Needs review
|
||||||
|
Riverbeast = "Fera-do-rio", -- Needs review
|
||||||
|
Rylak = "Rylak", -- Needs review
|
||||||
|
Scorpid = "Escorpiônico", -- Needs review
|
||||||
|
Serpent = "Serpente", -- Needs review
|
||||||
|
["Shale Spider"] = "Aranha Xistosa", -- Needs review
|
||||||
|
Shivarra = "Shivarra", -- Needs review
|
||||||
|
Silithid = "Silitídeo", -- Needs review
|
||||||
|
Spider = "Aranha", -- Needs review
|
||||||
|
["Spirit Beast"] = "Espírito Besta", -- Needs review
|
||||||
|
Sporebat = "Morcego Esporoso", -- Needs review
|
||||||
|
Stag = "Cervo", -- Needs review
|
||||||
|
Succubus = "Súcubo", -- Needs review
|
||||||
|
Tallstrider = "Passolargo", -- Needs review
|
||||||
|
Terrorguard = "Deimoguarda", -- Needs review
|
||||||
|
Totem = "Totem", -- Needs review
|
||||||
|
Turtle = "Tartaruga", -- Needs review
|
||||||
|
Undead = "Renegado", -- Needs review
|
||||||
|
Voidlord = "Senhor do Caos", -- Needs review
|
||||||
|
Voidwalker = "Caminhante do Vazio", -- Needs review
|
||||||
|
["Warp Stalker"] = "Espreitador Dimensional", -- Needs review
|
||||||
|
Wasp = "Vespa", -- Needs review
|
||||||
|
["Water Elemental"] = "Elemental da Água", -- Needs review
|
||||||
|
["Water Strider"] = "Caminhante das Águas", -- Needs review
|
||||||
|
-- ["Wild Pet"] = "",
|
||||||
|
["Wind Serpent"] = "Cobra Naja", -- Needs review
|
||||||
|
Wolf = "Lobo", -- Needs review
|
||||||
|
Worm = "Minhoca", -- Needs review
|
||||||
|
Wrathguard = "Guardião Colérico", -- Needs review
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "itIT" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
-- Aberration = "",
|
||||||
|
Abyssal = "Abission",
|
||||||
|
Basilisk = "Basilisco",
|
||||||
|
Bat = "Pipistrello",
|
||||||
|
Bear = "Orso",
|
||||||
|
Beast = "Bestia",
|
||||||
|
Beetle = "Scarafaggio",
|
||||||
|
["Bird of Prey"] = "Rapace",
|
||||||
|
Boar = "Cinghiale",
|
||||||
|
["Carrion Bird"] = "Mangiacarogne",
|
||||||
|
Cat = "Gatto",
|
||||||
|
Chimaera = "Chimera",
|
||||||
|
Clefthoof = "Mammuceronte",
|
||||||
|
["Core Hound"] = "Segugio del Nucleo",
|
||||||
|
Crab = "Granchio",
|
||||||
|
Crane = "Gru",
|
||||||
|
Critter = "Animale",
|
||||||
|
Crocolisk = "Coccodrillo",
|
||||||
|
Demon = "Demone",
|
||||||
|
Devilsaur = "Sauro Demoniaco",
|
||||||
|
Direhorn = "Cornofurente",
|
||||||
|
Dog = "Cane",
|
||||||
|
Doomguard = "Demone Guardiano",
|
||||||
|
Dragonhawk = "Dragofalco",
|
||||||
|
Dragonkin = "Dragoide",
|
||||||
|
Elemental = "Elementale",
|
||||||
|
Felguard = "Vilguardia",
|
||||||
|
Felhunter = "Vilsegugio",
|
||||||
|
["Fel Imp"] = "Vilimp",
|
||||||
|
Fox = "Volpe",
|
||||||
|
["Gas Cloud"] = "Nube di Gas",
|
||||||
|
Ghoul = "Ghoul",
|
||||||
|
Giant = "Gigante",
|
||||||
|
Goat = "Capra",
|
||||||
|
Gorilla = "Gorilla",
|
||||||
|
Humanoid = "Umanoide",
|
||||||
|
Hydra = "Idra",
|
||||||
|
Hyena = "Iena",
|
||||||
|
Imp = "Folletto",
|
||||||
|
Mechanical = "Meccanico",
|
||||||
|
Monkey = "Scimmia",
|
||||||
|
Moth = "Falena",
|
||||||
|
["Nether Ray"] = "Manta Fatua",
|
||||||
|
["Non-combat Pet"] = "Animale Non combattente",
|
||||||
|
["Not specified"] = "Non Specificato",
|
||||||
|
Observer = "Osservatore",
|
||||||
|
Porcupine = "Istrice",
|
||||||
|
Quilen = "Quilen",
|
||||||
|
Raptor = "Raptor",
|
||||||
|
Ravager = "Devastatore ",
|
||||||
|
["Remote Control"] = "Telecomando",
|
||||||
|
Rhino = "Rinoceronte",
|
||||||
|
Riverbeast = "Bestia dei Fiumi", -- Needs review
|
||||||
|
Rylak = "Rylak", -- Needs review
|
||||||
|
Scorpid = "Scorpione",
|
||||||
|
Serpent = "Serpente",
|
||||||
|
["Shale Spider"] = "Ragno D'argilla",
|
||||||
|
Shivarra = "Shivarra",
|
||||||
|
Silithid = "Silitide",
|
||||||
|
Spider = "Ragno",
|
||||||
|
["Spirit Beast"] = "Spirito di Bestia",
|
||||||
|
Sporebat = "Sporofago",
|
||||||
|
Stag = "Cervo",
|
||||||
|
Succubus = "Succube",
|
||||||
|
Tallstrider = "Zampalunga",
|
||||||
|
Terrorguard = "Guardia Maligna",
|
||||||
|
Totem = "Totem",
|
||||||
|
Turtle = "Tartaruga",
|
||||||
|
Undead = "Non Morto",
|
||||||
|
Voidlord = "Ombra del Vuoto",
|
||||||
|
Voidwalker = "Ombra del Vuoto",
|
||||||
|
["Warp Stalker"] = "Camminatore Distorto",
|
||||||
|
Wasp = "Vespa",
|
||||||
|
["Water Elemental"] = "Elementale d'Acqua",
|
||||||
|
["Water Strider"] = "Gerride",
|
||||||
|
-- ["Wild Pet"] = "",
|
||||||
|
["Wind Serpent"] = "Serpente Volante",
|
||||||
|
Wolf = "Lupo",
|
||||||
|
Worm = "Verme",
|
||||||
|
Wrathguard = "Guardia dell'Ira",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "ruRU" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
-- Aberration = "",
|
||||||
|
Abyssal = "Абиссал",
|
||||||
|
Basilisk = "Василиск",
|
||||||
|
Bat = "Летучая мышь",
|
||||||
|
Bear = "Медведь",
|
||||||
|
Beast = "Животное",
|
||||||
|
Beetle = "Жук",
|
||||||
|
["Bird of Prey"] = "Сова",
|
||||||
|
Boar = "Вепрь",
|
||||||
|
["Carrion Bird"] = "Падальщик",
|
||||||
|
Cat = "Кошка",
|
||||||
|
Chimaera = "Химера",
|
||||||
|
Clefthoof = "Копытень", -- Needs review
|
||||||
|
["Core Hound"] = "Гончая Недр",
|
||||||
|
Crab = "Краб",
|
||||||
|
Crane = "Журавль",
|
||||||
|
Critter = "Существо",
|
||||||
|
Crocolisk = "Кроколиск",
|
||||||
|
Demon = "Демон",
|
||||||
|
Devilsaur = "Дьявозавр",
|
||||||
|
Direhorn = "Дикорог", -- Needs review
|
||||||
|
Dog = "Собака",
|
||||||
|
Doomguard = "Стражник ужаса",
|
||||||
|
Dragonhawk = "Дракондор",
|
||||||
|
Dragonkin = "Дракон",
|
||||||
|
Elemental = "Элементаль",
|
||||||
|
Felguard = "Страж Скверны",
|
||||||
|
Felhunter = "Охотник Скверны",
|
||||||
|
["Fel Imp"] = "Бес Скверны",
|
||||||
|
Fox = "Лиса",
|
||||||
|
["Gas Cloud"] = "Газовое облако",
|
||||||
|
Ghoul = "Вурдалак",
|
||||||
|
Giant = "Великан",
|
||||||
|
Goat = "Козел",
|
||||||
|
Gorilla = "Горилла",
|
||||||
|
Humanoid = "Гуманоид",
|
||||||
|
Hydra = "Гидра", -- Needs review
|
||||||
|
Hyena = "Гиена",
|
||||||
|
Imp = "Бес",
|
||||||
|
Mechanical = "Механизм",
|
||||||
|
Monkey = "Обезьяна",
|
||||||
|
Moth = "Мотылек",
|
||||||
|
["Nether Ray"] = "Скат Пустоты",
|
||||||
|
["Non-combat Pet"] = "Спутник",
|
||||||
|
["Not specified"] = "Не указано",
|
||||||
|
Observer = "Наблюдатель",
|
||||||
|
Porcupine = "Дикобраз",
|
||||||
|
Quilen = "Цийлинь",
|
||||||
|
Raptor = "Ящер",
|
||||||
|
Ravager = "Опустошитель",
|
||||||
|
["Remote Control"] = "Управление",
|
||||||
|
Rhino = "Люторог",
|
||||||
|
Riverbeast = "Речное чудище", -- Needs review
|
||||||
|
Rylak = "Рилак", -- Needs review
|
||||||
|
Scorpid = "Скорпид",
|
||||||
|
Serpent = "Змей",
|
||||||
|
["Shale Spider"] = "Сланцевый паук",
|
||||||
|
Shivarra = "Шиварра",
|
||||||
|
Silithid = "Силитид",
|
||||||
|
Spider = "Паук",
|
||||||
|
["Spirit Beast"] = "Дух зверя",
|
||||||
|
Sporebat = "Спороскат",
|
||||||
|
Stag = "Олень", -- Needs review
|
||||||
|
Succubus = "Суккуб",
|
||||||
|
Tallstrider = "Долгоног",
|
||||||
|
Terrorguard = "Страж Ужаса",
|
||||||
|
Totem = "Тотем",
|
||||||
|
Turtle = "Черепаха",
|
||||||
|
Undead = "Нежить",
|
||||||
|
Voidlord = "Повелитель Бездны",
|
||||||
|
Voidwalker = "Демон Бездны",
|
||||||
|
["Warp Stalker"] = "Прыгуана",
|
||||||
|
Wasp = "Оса",
|
||||||
|
["Water Elemental"] = "Элементаль воды",
|
||||||
|
["Water Strider"] = "Водный Долгоног",
|
||||||
|
-- ["Wild Pet"] = "",
|
||||||
|
["Wind Serpent"] = "Крылатый змей",
|
||||||
|
Wolf = "Волк",
|
||||||
|
Worm = "Червь",
|
||||||
|
Wrathguard = "Страж гнева",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "zhCN" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Aberration = "畸变怪",
|
||||||
|
Abyssal = "深渊魔",
|
||||||
|
Basilisk = "石化蜥蜴",
|
||||||
|
Bat = "蝙蝠",
|
||||||
|
Bear = "熊",
|
||||||
|
Beast = "野兽",
|
||||||
|
Beetle = "甲虫",
|
||||||
|
["Bird of Prey"] = "猛禽",
|
||||||
|
Boar = "野猪",
|
||||||
|
["Carrion Bird"] = "食腐鸟",
|
||||||
|
Cat = "豹",
|
||||||
|
Chimaera = "奇美拉",
|
||||||
|
Clefthoof = "裂蹄牛",
|
||||||
|
["Core Hound"] = "熔岩犬",
|
||||||
|
Crab = "螃蟹",
|
||||||
|
Crane = "鹤",
|
||||||
|
Critter = "小动物",
|
||||||
|
Crocolisk = "鳄鱼",
|
||||||
|
Demon = "恶魔",
|
||||||
|
Devilsaur = "魔暴龙",
|
||||||
|
Direhorn = "恐角龙",
|
||||||
|
Dog = "狗",
|
||||||
|
Doomguard = "末日守卫",
|
||||||
|
Dragonhawk = "龙鹰",
|
||||||
|
Dragonkin = "龙类",
|
||||||
|
Elemental = "元素生物",
|
||||||
|
Felguard = "恶魔卫士",
|
||||||
|
Felhunter = "地狱猎犬",
|
||||||
|
["Fel Imp"] = "邪能小鬼",
|
||||||
|
Fox = "狐狸",
|
||||||
|
["Gas Cloud"] = "气体云雾",
|
||||||
|
Ghoul = "食尸鬼",
|
||||||
|
Giant = "巨人",
|
||||||
|
Goat = "山羊",
|
||||||
|
Gorilla = "猩猩",
|
||||||
|
Humanoid = "人型生物",
|
||||||
|
Hydra = "多头蛇",
|
||||||
|
Hyena = "土狼",
|
||||||
|
Imp = "小鬼",
|
||||||
|
Mechanical = "机械",
|
||||||
|
Monkey = "猴子",
|
||||||
|
Moth = "蛾子",
|
||||||
|
["Nether Ray"] = "虚空鳐",
|
||||||
|
["Non-combat Pet"] = "非战斗宠物",
|
||||||
|
["Not specified"] = "未指定",
|
||||||
|
Observer = "眼魔",
|
||||||
|
Porcupine = "箭猪",
|
||||||
|
Quilen = "魁麟",
|
||||||
|
Raptor = "迅猛龙",
|
||||||
|
Ravager = "掠食者",
|
||||||
|
["Remote Control"] = "远程控制",
|
||||||
|
Rhino = "犀牛",
|
||||||
|
Riverbeast = "淡水兽",
|
||||||
|
Rylak = "双头飞龙",
|
||||||
|
Scorpid = "蝎子",
|
||||||
|
Serpent = "蛇",
|
||||||
|
["Shale Spider"] = "页岩蜘蛛",
|
||||||
|
Shivarra = "破坏魔",
|
||||||
|
Silithid = "异种虫",
|
||||||
|
Spider = "蜘蛛",
|
||||||
|
["Spirit Beast"] = "灵魂兽",
|
||||||
|
Sporebat = "孢子蝠",
|
||||||
|
Stag = "雄鹿",
|
||||||
|
Succubus = "魅魔",
|
||||||
|
Tallstrider = "陆行鸟",
|
||||||
|
Terrorguard = "恐惧卫士",
|
||||||
|
Totem = "图腾",
|
||||||
|
Turtle = "海龟",
|
||||||
|
Undead = "亡灵",
|
||||||
|
Voidlord = "虚空领主",
|
||||||
|
Voidwalker = "虚空行者",
|
||||||
|
["Warp Stalker"] = "迁跃捕猎者",
|
||||||
|
Wasp = "巨蜂",
|
||||||
|
["Water Elemental"] = "水元素",
|
||||||
|
["Water Strider"] = "水黾",
|
||||||
|
["Wild Pet"] = "野生宠物",
|
||||||
|
["Wind Serpent"] = "风蛇",
|
||||||
|
Wolf = "狼",
|
||||||
|
Worm = "蠕虫",
|
||||||
|
Wrathguard = "愤怒卫士",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "zhTW" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
-- Aberration = "",
|
||||||
|
Abyssal = "冥淵火",
|
||||||
|
Basilisk = "蜥蜴",
|
||||||
|
Bat = "蝙蝠",
|
||||||
|
Bear = "熊",
|
||||||
|
Beast = "野獸",
|
||||||
|
Beetle = "甲殼蟲",
|
||||||
|
["Bird of Prey"] = "猛禽",
|
||||||
|
Boar = "野豬",
|
||||||
|
["Carrion Bird"] = "食腐鳥",
|
||||||
|
Cat = "豹",
|
||||||
|
Chimaera = "奇美拉",
|
||||||
|
-- Clefthoof = "",
|
||||||
|
["Core Hound"] = "熔核犬",
|
||||||
|
Crab = "螃蟹",
|
||||||
|
Crane = "鶴",
|
||||||
|
Critter = "小動物",
|
||||||
|
Crocolisk = "鱷魚",
|
||||||
|
Demon = "惡魔",
|
||||||
|
Devilsaur = "魔暴龍",
|
||||||
|
-- Direhorn = "",
|
||||||
|
Dog = "狗",
|
||||||
|
Doomguard = "末日守衛",
|
||||||
|
Dragonhawk = "龍鷹",
|
||||||
|
Dragonkin = "龍類",
|
||||||
|
Elemental = "元素生物",
|
||||||
|
Felguard = "惡魔守衛",
|
||||||
|
Felhunter = "惡魔獵犬",
|
||||||
|
["Fel Imp"] = "魔化小鬼",
|
||||||
|
Fox = "狐狸",
|
||||||
|
["Gas Cloud"] = "氣體雲",
|
||||||
|
Ghoul = "食屍鬼",
|
||||||
|
Giant = "巨人",
|
||||||
|
Goat = "山羊",
|
||||||
|
Gorilla = "猩猩",
|
||||||
|
Humanoid = "人型生物",
|
||||||
|
-- Hydra = "",
|
||||||
|
Hyena = "土狼",
|
||||||
|
Imp = "小鬼",
|
||||||
|
Mechanical = "機械",
|
||||||
|
Monkey = "猴子",
|
||||||
|
Moth = "蛾",
|
||||||
|
["Nether Ray"] = "虛空鰭刺",
|
||||||
|
["Non-combat Pet"] = "非戰鬥寵物",
|
||||||
|
["Not specified"] = "不明",
|
||||||
|
Observer = "觀察者",
|
||||||
|
Porcupine = "豪豬",
|
||||||
|
Quilen = "麒麟獸",
|
||||||
|
Raptor = "迅猛龍",
|
||||||
|
Ravager = "劫毀者",
|
||||||
|
["Remote Control"] = "遙控",
|
||||||
|
Rhino = "犀牛",
|
||||||
|
-- Riverbeast = "",
|
||||||
|
-- Rylak = "",
|
||||||
|
Scorpid = "蠍子",
|
||||||
|
Serpent = "毒蛇",
|
||||||
|
["Shale Spider"] = "岩蛛",
|
||||||
|
Shivarra = "希瓦拉",
|
||||||
|
Silithid = "異種蟲族",
|
||||||
|
Spider = "蜘蛛",
|
||||||
|
["Spirit Beast"] = "靈獸",
|
||||||
|
Sporebat = "孢子蝙蝠",
|
||||||
|
-- Stag = "",
|
||||||
|
Succubus = "魅魔",
|
||||||
|
Tallstrider = "陸行鳥",
|
||||||
|
Terrorguard = "懼護衛",
|
||||||
|
Totem = "圖騰",
|
||||||
|
Turtle = "海龜",
|
||||||
|
Undead = "不死族",
|
||||||
|
Voidlord = "虛無領主",
|
||||||
|
Voidwalker = "虛無行者",
|
||||||
|
["Warp Stalker"] = "扭曲巡者",
|
||||||
|
Wasp = "黃蜂",
|
||||||
|
["Water Elemental"] = "水元素",
|
||||||
|
["Water Strider"] = "水黽",
|
||||||
|
-- ["Wild Pet"] = "",
|
||||||
|
["Wind Serpent"] = "風蛇",
|
||||||
|
Wolf = "狼",
|
||||||
|
Worm = "蟲",
|
||||||
|
Wrathguard = "憤怒守衛",
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
error(("%s: Locale %q not supported"):format(MAJOR_VERSION, GAME_LOCALE))
|
||||||
|
end
|
|
@ -0,0 +1,15 @@
|
||||||
|
## Interface: 60000
|
||||||
|
## LoadOnDemand: 1
|
||||||
|
## Title: Lib: Babble-CreatureType-3.0
|
||||||
|
## Notes: A library to help with localization of the output of UnitCreatureType.
|
||||||
|
## Author: Kemayo
|
||||||
|
## X-eMail: kemayo AT gmail DOT com
|
||||||
|
## X-Category: Library
|
||||||
|
## X-License: MIT
|
||||||
|
## X-Curse-Packaged-Version: 6.0-release3
|
||||||
|
## X-Curse-Project-Name: LibBabble-CreatureType-3.0
|
||||||
|
## X-Curse-Project-ID: libbabble-creaturetype-3-0
|
||||||
|
## X-Curse-Repository-ID: wow/libbabble-creaturetype-3-0/mainline
|
||||||
|
|
||||||
|
LibStub\LibStub.lua
|
||||||
|
lib.xml
|
|
@ -0,0 +1,51 @@
|
||||||
|
-- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
|
||||||
|
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info
|
||||||
|
-- LibStub is hereby placed in the Public Domain
|
||||||
|
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
|
||||||
|
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
|
||||||
|
local LibStub = _G[LIBSTUB_MAJOR]
|
||||||
|
|
||||||
|
-- Check to see is this version of the stub is obsolete
|
||||||
|
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
|
||||||
|
LibStub = LibStub or {libs = {}, minors = {} }
|
||||||
|
_G[LIBSTUB_MAJOR] = LibStub
|
||||||
|
LibStub.minor = LIBSTUB_MINOR
|
||||||
|
|
||||||
|
-- LibStub:NewLibrary(major, minor)
|
||||||
|
-- major (string) - the major version of the library
|
||||||
|
-- minor (string or number ) - the minor version of the library
|
||||||
|
--
|
||||||
|
-- returns nil if a newer or same version of the lib is already present
|
||||||
|
-- returns empty library object or old library object if upgrade is needed
|
||||||
|
function LibStub:NewLibrary(major, minor)
|
||||||
|
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
|
||||||
|
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
|
||||||
|
|
||||||
|
local oldminor = self.minors[major]
|
||||||
|
if oldminor and oldminor >= minor then return nil end
|
||||||
|
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
|
||||||
|
return self.libs[major], oldminor
|
||||||
|
end
|
||||||
|
|
||||||
|
-- LibStub:GetLibrary(major, [silent])
|
||||||
|
-- major (string) - the major version of the library
|
||||||
|
-- silent (boolean) - if true, library is optional, silently return nil if its not found
|
||||||
|
--
|
||||||
|
-- throws an error if the library can not be found (except silent is set)
|
||||||
|
-- returns the library object if found
|
||||||
|
function LibStub:GetLibrary(major, silent)
|
||||||
|
if not self.libs[major] and not silent then
|
||||||
|
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
|
||||||
|
end
|
||||||
|
return self.libs[major], self.minors[major]
|
||||||
|
end
|
||||||
|
|
||||||
|
-- LibStub:IterateLibraries()
|
||||||
|
--
|
||||||
|
-- Returns an iterator for the currently registered libraries
|
||||||
|
function LibStub:IterateLibraries()
|
||||||
|
return pairs(self.libs)
|
||||||
|
end
|
||||||
|
|
||||||
|
setmetatable(LibStub, { __call = LibStub.GetLibrary })
|
||||||
|
end
|
|
@ -0,0 +1,13 @@
|
||||||
|
## Interface: 60000
|
||||||
|
## Title: Lib: LibStub
|
||||||
|
## Notes: Universal Library Stub
|
||||||
|
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
|
||||||
|
## X-Website: http://www.wowace.com/addons/libstub/
|
||||||
|
## X-Category: Library
|
||||||
|
## X-License: Public Domain
|
||||||
|
## X-Curse-Packaged-Version: 1.0.2.60000
|
||||||
|
## X-Curse-Project-Name: LibStub
|
||||||
|
## X-Curse-Project-ID: libstub
|
||||||
|
## X-Curse-Repository-ID: wow/libstub/mainline
|
||||||
|
|
||||||
|
LibStub.lua
|
|
@ -0,0 +1,41 @@
|
||||||
|
debugstack = debug.traceback
|
||||||
|
strmatch = string.match
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy
|
||||||
|
assert(lib) -- should return the library table
|
||||||
|
assert(not oldMinor) -- should not return the old minor, since it didn't exist
|
||||||
|
|
||||||
|
-- the following is to create data and then be able to check if the same data exists after the fact
|
||||||
|
function lib:MyMethod()
|
||||||
|
end
|
||||||
|
local MyMethod = lib.MyMethod
|
||||||
|
lib.MyTable = {}
|
||||||
|
local MyTable = lib.MyTable
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 1) -- try to register a library with the same version, should silently fail
|
||||||
|
assert(not newLib) -- should not return since out of date
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 0) -- try to register a library with a previous, should silently fail
|
||||||
|
assert(not newLib) -- should not return since out of date
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 2) -- register a new version
|
||||||
|
assert(newLib) -- library table
|
||||||
|
assert(rawequal(newLib, lib)) -- should be the same reference as the previous
|
||||||
|
assert(newOldMinor == 1) -- should return the minor version of the previous version
|
||||||
|
|
||||||
|
assert(rawequal(lib.MyMethod, MyMethod)) -- verify that values were saved
|
||||||
|
assert(rawequal(lib.MyTable, MyTable)) -- verify that values were saved
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 3 Blah") -- register a new version with a string minor version (instead of a number)
|
||||||
|
assert(newLib) -- library table
|
||||||
|
assert(newOldMinor == 2) -- previous version was 2
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 4 and please ignore 15 Blah") -- register a new version with a string minor version (instead of a number)
|
||||||
|
assert(newLib)
|
||||||
|
assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string)
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
|
||||||
|
assert(newLib)
|
||||||
|
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
|
|
@ -0,0 +1,27 @@
|
||||||
|
debugstack = debug.traceback
|
||||||
|
strmatch = string.match
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
for major, library in LibStub:IterateLibraries() do
|
||||||
|
-- check that MyLib doesn't exist yet, by iterating through all the libraries
|
||||||
|
assert(major ~= "MyLib")
|
||||||
|
end
|
||||||
|
|
||||||
|
assert(not LibStub:GetLibrary("MyLib", true)) -- check that MyLib doesn't exist yet by direct checking
|
||||||
|
assert(not pcall(LibStub.GetLibrary, LibStub, "MyLib")) -- don't silently fail, thus it should raise an error.
|
||||||
|
local lib = LibStub:NewLibrary("MyLib", 1) -- create the lib
|
||||||
|
assert(lib) -- check it exists
|
||||||
|
assert(rawequal(LibStub:GetLibrary("MyLib"), lib)) -- verify that :GetLibrary("MyLib") properly equals the lib reference
|
||||||
|
|
||||||
|
assert(LibStub:NewLibrary("MyLib", 2)) -- create a new version
|
||||||
|
|
||||||
|
local count=0
|
||||||
|
for major, library in LibStub:IterateLibraries() do
|
||||||
|
-- check that MyLib exists somewhere in the libraries, by iterating through all the libraries
|
||||||
|
if major == "MyLib" then -- we found it!
|
||||||
|
count = count +1
|
||||||
|
assert(rawequal(library, lib)) -- verify that the references are equal
|
||||||
|
end
|
||||||
|
end
|
||||||
|
assert(count == 1) -- verify that we actually found it, and only once
|
|
@ -0,0 +1,14 @@
|
||||||
|
debugstack = debug.traceback
|
||||||
|
strmatch = string.match
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
local proxy = newproxy() -- non-string
|
||||||
|
|
||||||
|
assert(not pcall(LibStub.NewLibrary, LibStub, proxy, 1)) -- should error, proxy is not a string, it's userdata
|
||||||
|
local success, ret = pcall(LibStub.GetLibrary, proxy, true)
|
||||||
|
assert(not success or not ret) -- either error because proxy is not a string or because it's not actually registered.
|
||||||
|
|
||||||
|
assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
|
||||||
|
|
||||||
|
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
|
|
@ -0,0 +1,41 @@
|
||||||
|
debugstack = debug.traceback
|
||||||
|
strmatch = string.match
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
|
||||||
|
-- Pretend like loaded libstub is old and doesn't have :IterateLibraries
|
||||||
|
assert(LibStub.minor)
|
||||||
|
LibStub.minor = LibStub.minor - 0.0001
|
||||||
|
LibStub.IterateLibraries = nil
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
assert(type(LibStub.IterateLibraries)=="function")
|
||||||
|
|
||||||
|
|
||||||
|
-- Now pretend that we're the same version -- :IterateLibraries should NOT be re-created
|
||||||
|
LibStub.IterateLibraries = 123
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
assert(LibStub.IterateLibraries == 123)
|
||||||
|
|
||||||
|
|
||||||
|
-- Now pretend that a newer version is loaded -- :IterateLibraries should NOT be re-created
|
||||||
|
LibStub.minor = LibStub.minor + 0.0001
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
assert(LibStub.IterateLibraries == 123)
|
||||||
|
|
||||||
|
|
||||||
|
-- Again with a huge number
|
||||||
|
LibStub.minor = LibStub.minor + 1234567890
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
assert(LibStub.IterateLibraries == 123)
|
||||||
|
|
||||||
|
|
||||||
|
print("OK")
|
|
@ -0,0 +1,5 @@
|
||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||||
|
..\FrameXML\UI.xsd">
|
||||||
|
<Script file="LibBabble-3.0.lua" />
|
||||||
|
<Script file="LibBabble-CreatureType-3.0.lua" />
|
||||||
|
</Ui>
|
|
@ -0,0 +1,19 @@
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
r71 | nevcairiel | 2014-11-02 10:31:50 +0000 (Sun, 02 Nov 2014) | 1 line
|
||||||
|
Changed paths:
|
||||||
|
A /tags/6.0-release3 (from /trunk:70)
|
||||||
|
|
||||||
|
Weekly Tag - #3
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
r70 | nevcairiel | 2014-11-02 10:31:22 +0000 (Sun, 02 Nov 2014) | 1 line
|
||||||
|
Changed paths:
|
||||||
|
M /trunk/LibBabble-TalentTree-3.0.lua
|
||||||
|
|
||||||
|
Automated LibBabble re-generation from the localization system
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
r68 | nevcairiel | 2014-10-14 19:01:38 +0000 (Tue, 14 Oct 2014) | 1 line
|
||||||
|
Changed paths:
|
||||||
|
M /trunk/LibBabble-TalentTree-3.0.toc
|
||||||
|
|
||||||
|
Update for 6.0
|
||||||
|
------------------------------------------------------------------------
|
|
@ -0,0 +1,292 @@
|
||||||
|
-- LibBabble-3.0 is hereby placed in the Public Domain
|
||||||
|
-- Credits: ckknight
|
||||||
|
local LIBBABBLE_MAJOR, LIBBABBLE_MINOR = "LibBabble-3.0", 2
|
||||||
|
|
||||||
|
local LibBabble = LibStub:NewLibrary(LIBBABBLE_MAJOR, LIBBABBLE_MINOR)
|
||||||
|
if not LibBabble then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local data = LibBabble.data or {}
|
||||||
|
for k,v in pairs(LibBabble) do
|
||||||
|
LibBabble[k] = nil
|
||||||
|
end
|
||||||
|
LibBabble.data = data
|
||||||
|
|
||||||
|
local tablesToDB = {}
|
||||||
|
for namespace, db in pairs(data) do
|
||||||
|
for k,v in pairs(db) do
|
||||||
|
tablesToDB[v] = db
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function warn(message)
|
||||||
|
local _, ret = pcall(error, message, 3)
|
||||||
|
geterrorhandler()(ret)
|
||||||
|
end
|
||||||
|
|
||||||
|
local lookup_mt = { __index = function(self, key)
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
local current_key = db.current[key]
|
||||||
|
if current_key then
|
||||||
|
self[key] = current_key
|
||||||
|
return current_key
|
||||||
|
end
|
||||||
|
local base_key = db.base[key]
|
||||||
|
local real_MAJOR_VERSION
|
||||||
|
for k,v in pairs(data) do
|
||||||
|
if v == db then
|
||||||
|
real_MAJOR_VERSION = k
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not real_MAJOR_VERSION then
|
||||||
|
real_MAJOR_VERSION = LIBBABBLE_MAJOR
|
||||||
|
end
|
||||||
|
if base_key then
|
||||||
|
warn(("%s: Translation %q not found for locale %q"):format(real_MAJOR_VERSION, key, GetLocale()))
|
||||||
|
rawset(self, key, base_key)
|
||||||
|
return base_key
|
||||||
|
end
|
||||||
|
warn(("%s: Translation %q not found."):format(real_MAJOR_VERSION, key))
|
||||||
|
rawset(self, key, key)
|
||||||
|
return key
|
||||||
|
end }
|
||||||
|
|
||||||
|
local function initLookup(module, lookup)
|
||||||
|
local db = tablesToDB[module]
|
||||||
|
for k in pairs(lookup) do
|
||||||
|
lookup[k] = nil
|
||||||
|
end
|
||||||
|
setmetatable(lookup, lookup_mt)
|
||||||
|
tablesToDB[lookup] = db
|
||||||
|
db.lookup = lookup
|
||||||
|
return lookup
|
||||||
|
end
|
||||||
|
|
||||||
|
local function initReverse(module, reverse)
|
||||||
|
local db = tablesToDB[module]
|
||||||
|
for k in pairs(reverse) do
|
||||||
|
reverse[k] = nil
|
||||||
|
end
|
||||||
|
for k,v in pairs(db.current) do
|
||||||
|
reverse[v] = k
|
||||||
|
end
|
||||||
|
tablesToDB[reverse] = db
|
||||||
|
db.reverse = reverse
|
||||||
|
db.reverseIterators = nil
|
||||||
|
return reverse
|
||||||
|
end
|
||||||
|
|
||||||
|
local prototype = {}
|
||||||
|
local prototype_mt = {__index = prototype}
|
||||||
|
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Notes:
|
||||||
|
* If you try to access a nonexistent key, it will warn but allow the code to pass through.
|
||||||
|
Returns:
|
||||||
|
A lookup table for english to localized words.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
local BL = B:GetLookupTable()
|
||||||
|
assert(BL["Some english word"] == "Some localized word")
|
||||||
|
DoSomething(BL["Some english word that doesn't exist"]) -- warning!
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetLookupTable()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
local lookup = db.lookup
|
||||||
|
if lookup then
|
||||||
|
return lookup
|
||||||
|
end
|
||||||
|
return initLookup(self, {})
|
||||||
|
end
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Notes:
|
||||||
|
* If you try to access a nonexistent key, it will return nil.
|
||||||
|
Returns:
|
||||||
|
A lookup table for english to localized words.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
local B_has = B:GetUnstrictLookupTable()
|
||||||
|
assert(B_has["Some english word"] == "Some localized word")
|
||||||
|
assert(B_has["Some english word that doesn't exist"] == nil)
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetUnstrictLookupTable()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
return db.current
|
||||||
|
end
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Notes:
|
||||||
|
* If you try to access a nonexistent key, it will return nil.
|
||||||
|
* This is useful for checking if the base (English) table has a key, even if the localized one does not have it registered.
|
||||||
|
Returns:
|
||||||
|
A lookup table for english to localized words.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
local B_hasBase = B:GetBaseLookupTable()
|
||||||
|
assert(B_hasBase["Some english word"] == "Some english word")
|
||||||
|
assert(B_hasBase["Some english word that doesn't exist"] == nil)
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetBaseLookupTable()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
return db.base
|
||||||
|
end
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Notes:
|
||||||
|
* If you try to access a nonexistent key, it will return nil.
|
||||||
|
* This will return only one English word that it maps to, if there are more than one to check, see :GetReverseIterator("word")
|
||||||
|
Returns:
|
||||||
|
A lookup table for localized to english words.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
local BR = B:GetReverseLookupTable()
|
||||||
|
assert(BR["Some localized word"] == "Some english word")
|
||||||
|
assert(BR["Some localized word that doesn't exist"] == nil)
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetReverseLookupTable()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
local reverse = db.reverse
|
||||||
|
if reverse then
|
||||||
|
return reverse
|
||||||
|
end
|
||||||
|
return initReverse(self, {})
|
||||||
|
end
|
||||||
|
local blank = {}
|
||||||
|
local weakVal = {__mode='v'}
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Arguments:
|
||||||
|
string - the localized word to chek for.
|
||||||
|
Returns:
|
||||||
|
An iterator to traverse all English words that map to the given key
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
for word in B:GetReverseIterator("Some localized word") do
|
||||||
|
DoSomething(word)
|
||||||
|
end
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:GetReverseIterator(key)
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
local reverseIterators = db.reverseIterators
|
||||||
|
if not reverseIterators then
|
||||||
|
reverseIterators = setmetatable({}, weakVal)
|
||||||
|
db.reverseIterators = reverseIterators
|
||||||
|
elseif reverseIterators[key] then
|
||||||
|
return pairs(reverseIterators[key])
|
||||||
|
end
|
||||||
|
local t
|
||||||
|
for k,v in pairs(db.current) do
|
||||||
|
if v == key then
|
||||||
|
if not t then
|
||||||
|
t = {}
|
||||||
|
end
|
||||||
|
t[k] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
reverseIterators[key] = t or blank
|
||||||
|
return pairs(reverseIterators[key])
|
||||||
|
end
|
||||||
|
--[[---------------------------------------------------------------------------
|
||||||
|
Returns:
|
||||||
|
An iterator to traverse all translations English to localized.
|
||||||
|
Example:
|
||||||
|
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||||
|
for english, localized in B:Iterate() do
|
||||||
|
DoSomething(english, localized)
|
||||||
|
end
|
||||||
|
-----------------------------------------------------------------------------]]
|
||||||
|
function prototype:Iterate()
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
|
||||||
|
return pairs(db.current)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- #NODOC
|
||||||
|
-- modules need to call this to set the base table
|
||||||
|
function prototype:SetBaseTranslations(base)
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
local oldBase = db.base
|
||||||
|
if oldBase then
|
||||||
|
for k in pairs(oldBase) do
|
||||||
|
oldBase[k] = nil
|
||||||
|
end
|
||||||
|
for k, v in pairs(base) do
|
||||||
|
oldBase[k] = v
|
||||||
|
end
|
||||||
|
base = oldBase
|
||||||
|
else
|
||||||
|
db.base = base
|
||||||
|
end
|
||||||
|
for k,v in pairs(base) do
|
||||||
|
if v == true then
|
||||||
|
base[k] = k
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function init(module)
|
||||||
|
local db = tablesToDB[module]
|
||||||
|
if db.lookup then
|
||||||
|
initLookup(module, db.lookup)
|
||||||
|
end
|
||||||
|
if db.reverse then
|
||||||
|
initReverse(module, db.reverse)
|
||||||
|
end
|
||||||
|
db.reverseIterators = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- #NODOC
|
||||||
|
-- modules need to call this to set the current table. if current is true, use the base table.
|
||||||
|
function prototype:SetCurrentTranslations(current)
|
||||||
|
local db = tablesToDB[self]
|
||||||
|
if current == true then
|
||||||
|
db.current = db.base
|
||||||
|
else
|
||||||
|
local oldCurrent = db.current
|
||||||
|
if oldCurrent then
|
||||||
|
for k in pairs(oldCurrent) do
|
||||||
|
oldCurrent[k] = nil
|
||||||
|
end
|
||||||
|
for k, v in pairs(current) do
|
||||||
|
oldCurrent[k] = v
|
||||||
|
end
|
||||||
|
current = oldCurrent
|
||||||
|
else
|
||||||
|
db.current = current
|
||||||
|
end
|
||||||
|
end
|
||||||
|
init(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
for namespace, db in pairs(data) do
|
||||||
|
setmetatable(db.module, prototype_mt)
|
||||||
|
init(db.module)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- #NODOC
|
||||||
|
-- modules need to call this to create a new namespace.
|
||||||
|
function LibBabble:New(namespace, minor)
|
||||||
|
local module, oldminor = LibStub:NewLibrary(namespace, minor)
|
||||||
|
if not module then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not oldminor then
|
||||||
|
local db = {
|
||||||
|
module = module,
|
||||||
|
}
|
||||||
|
data[namespace] = db
|
||||||
|
tablesToDB[module] = db
|
||||||
|
else
|
||||||
|
for k,v in pairs(module) do
|
||||||
|
module[k] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
setmetatable(module, prototype_mt)
|
||||||
|
|
||||||
|
return module
|
||||||
|
end
|
|
@ -0,0 +1,410 @@
|
||||||
|
--[[
|
||||||
|
Name: LibBabble-TalentTree-3.0
|
||||||
|
Revision: $Rev: 70 $
|
||||||
|
Maintainers: ckknight, nevcairiel, Ackis
|
||||||
|
Website: http://www.wowace.com/projects/libbabble-talenttree-3-0/
|
||||||
|
Dependencies: None
|
||||||
|
License: MIT
|
||||||
|
]]
|
||||||
|
|
||||||
|
local MAJOR_VERSION = "LibBabble-TalentTree-3.0"
|
||||||
|
local MINOR_VERSION = 90000 + tonumber(("$Rev: 70 $"):match("%d+"))
|
||||||
|
|
||||||
|
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
|
||||||
|
local lib = LibStub("LibBabble-3.0"):New(MAJOR_VERSION, MINOR_VERSION)
|
||||||
|
if not lib then return end
|
||||||
|
|
||||||
|
local GAME_LOCALE = GetLocale()
|
||||||
|
|
||||||
|
lib:SetBaseTranslations {
|
||||||
|
Affliction = "Affliction",
|
||||||
|
Arcane = "Arcane",
|
||||||
|
Arms = "Arms",
|
||||||
|
Assassination = "Assassination",
|
||||||
|
Balance = "Balance",
|
||||||
|
["Beast Mastery"] = "Beast Mastery",
|
||||||
|
Blood = "Blood",
|
||||||
|
Brewmaster = "Brewmaster",
|
||||||
|
Combat = "Combat",
|
||||||
|
Demonology = "Demonology",
|
||||||
|
Destruction = "Destruction",
|
||||||
|
Discipline = "Discipline",
|
||||||
|
Elemental = "Elemental",
|
||||||
|
Enhancement = "Enhancement",
|
||||||
|
Feral = "Feral",
|
||||||
|
["Feral Combat"] = "Feral Combat",
|
||||||
|
Fire = "Fire",
|
||||||
|
Frost = "Frost",
|
||||||
|
Fury = "Fury",
|
||||||
|
Guardian = "Guardian",
|
||||||
|
Holy = "Holy",
|
||||||
|
Hybrid = "Hybrid",
|
||||||
|
Marksmanship = "Marksmanship",
|
||||||
|
Mistweaver = "Mistweaver",
|
||||||
|
Protection = "Protection",
|
||||||
|
Restoration = "Restoration",
|
||||||
|
Retribution = "Retribution",
|
||||||
|
Shadow = "Shadow",
|
||||||
|
Subtlety = "Subtlety",
|
||||||
|
Survival = "Survival",
|
||||||
|
Unholy = "Unholy",
|
||||||
|
Windwalker = "Windwalker",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if GAME_LOCALE == "enUS" then
|
||||||
|
lib:SetCurrentTranslations(true)
|
||||||
|
elseif GAME_LOCALE == "deDE" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "Gebrechen",
|
||||||
|
Arcane = "Arkan",
|
||||||
|
Arms = "Waffen",
|
||||||
|
Assassination = "Meucheln",
|
||||||
|
Balance = "Gleichgewicht",
|
||||||
|
["Beast Mastery"] = "Tierherrschaft",
|
||||||
|
Blood = "Blut",
|
||||||
|
Brewmaster = "Braumeister", -- Needs review
|
||||||
|
Combat = "Kampf",
|
||||||
|
Demonology = "Dämonologie",
|
||||||
|
Destruction = "Zerstörung",
|
||||||
|
Discipline = "Disziplin",
|
||||||
|
Elemental = "Elementar",
|
||||||
|
Enhancement = "Verstärkung",
|
||||||
|
Feral = "Wildheit", -- Needs review
|
||||||
|
["Feral Combat"] = "Wilder Kampf",
|
||||||
|
Fire = "Feuer",
|
||||||
|
Frost = "Frost",
|
||||||
|
Fury = "Furor",
|
||||||
|
Guardian = "Wächter", -- Needs review
|
||||||
|
Holy = "Heilig",
|
||||||
|
Hybrid = "Hybride",
|
||||||
|
Marksmanship = "Treffsicherheit",
|
||||||
|
Mistweaver = "Nebelwirker", -- Needs review
|
||||||
|
Protection = "Schutz",
|
||||||
|
Restoration = "Wiederherstellung",
|
||||||
|
Retribution = "Vergeltung",
|
||||||
|
Shadow = "Schatten",
|
||||||
|
Subtlety = "Täuschung",
|
||||||
|
Survival = "Überleben",
|
||||||
|
Unholy = "Unheilig",
|
||||||
|
Windwalker = "Windläufer", -- Needs review
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "frFR" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "Affliction",
|
||||||
|
Arcane = "Arcane",
|
||||||
|
Arms = "Armes",
|
||||||
|
Assassination = "Assassinat",
|
||||||
|
Balance = "Equilibre",
|
||||||
|
["Beast Mastery"] = "Maîtrise des bêtes",
|
||||||
|
Blood = "Sang",
|
||||||
|
Brewmaster = "Maître brasseur",
|
||||||
|
Combat = "Combat",
|
||||||
|
Demonology = "Démonologie",
|
||||||
|
Destruction = "Destruction",
|
||||||
|
Discipline = "Discipline",
|
||||||
|
Elemental = "Elémentaire",
|
||||||
|
Enhancement = "Amélioration",
|
||||||
|
Feral = "Farouche",
|
||||||
|
["Feral Combat"] = "Combat farouche",
|
||||||
|
Fire = "Feu",
|
||||||
|
Frost = "Givre",
|
||||||
|
Fury = "Fureur",
|
||||||
|
Guardian = "Gardien",
|
||||||
|
Holy = "Sacré",
|
||||||
|
Hybrid = "Hybride",
|
||||||
|
Marksmanship = "Précision",
|
||||||
|
Mistweaver = "Tisse-brume",
|
||||||
|
Protection = "Protection",
|
||||||
|
Restoration = "Restauration",
|
||||||
|
Retribution = "Vindicte",
|
||||||
|
Shadow = "Ombre",
|
||||||
|
Subtlety = "Finesse",
|
||||||
|
Survival = "Survie",
|
||||||
|
Unholy = "Impie",
|
||||||
|
Windwalker = "Marche-vent",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "koKR" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "고통",
|
||||||
|
Arcane = "비전",
|
||||||
|
Arms = "무기",
|
||||||
|
Assassination = "암살",
|
||||||
|
Balance = "조화",
|
||||||
|
["Beast Mastery"] = "야수",
|
||||||
|
Blood = "혈기",
|
||||||
|
Brewmaster = "양조",
|
||||||
|
Combat = "전투",
|
||||||
|
Demonology = "악마",
|
||||||
|
Destruction = "파괴",
|
||||||
|
Discipline = "수양",
|
||||||
|
Elemental = "정기",
|
||||||
|
Enhancement = "고양",
|
||||||
|
Feral = "야성",
|
||||||
|
["Feral Combat"] = "야성",
|
||||||
|
Fire = "화염",
|
||||||
|
Frost = "냉기",
|
||||||
|
Fury = "분노",
|
||||||
|
Guardian = "수호",
|
||||||
|
Holy = "신성",
|
||||||
|
Hybrid = "하이브리드",
|
||||||
|
Marksmanship = "사격",
|
||||||
|
Mistweaver = "운무",
|
||||||
|
Protection = "방어",
|
||||||
|
Restoration = "복원",
|
||||||
|
Retribution = "징벌",
|
||||||
|
Shadow = "암흑",
|
||||||
|
Subtlety = "잠행",
|
||||||
|
Survival = "생존",
|
||||||
|
Unholy = "부정",
|
||||||
|
Windwalker = "풍운",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "esES" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "Aflicción",
|
||||||
|
Arcane = "Arcano",
|
||||||
|
Arms = "Armas",
|
||||||
|
Assassination = "Asesinato",
|
||||||
|
Balance = "Equilibrio",
|
||||||
|
["Beast Mastery"] = "Dominio de bestias",
|
||||||
|
Blood = "Sangre",
|
||||||
|
Brewmaster = "Maestro cervecero", -- Needs review
|
||||||
|
Combat = "Combate",
|
||||||
|
Demonology = "Demonología",
|
||||||
|
Destruction = "Destrucción",
|
||||||
|
Discipline = "Disciplina",
|
||||||
|
Elemental = "Elemental",
|
||||||
|
Enhancement = "Mejora",
|
||||||
|
Feral = "Feral", -- Needs review
|
||||||
|
["Feral Combat"] = "Combate Feral",
|
||||||
|
Fire = "Fuego",
|
||||||
|
Frost = "Escarcha",
|
||||||
|
Fury = "Furia",
|
||||||
|
Guardian = "Guardián", -- Needs review
|
||||||
|
Holy = "Sagrado",
|
||||||
|
Hybrid = "Híbrido",
|
||||||
|
Marksmanship = "Puntería",
|
||||||
|
Mistweaver = "Tejedor de niebla", -- Needs review
|
||||||
|
Protection = "Protección",
|
||||||
|
Restoration = "Restauración",
|
||||||
|
Retribution = "Reprensión",
|
||||||
|
Shadow = "Sombras",
|
||||||
|
Subtlety = "Sutileza",
|
||||||
|
Survival = "Supervivencia",
|
||||||
|
Unholy = "Profano",
|
||||||
|
Windwalker = "Viajero del viento", -- Needs review
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "esMX" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "Aflicción",
|
||||||
|
Arcane = "Arcano",
|
||||||
|
Arms = "Armas",
|
||||||
|
Assassination = "Asesinato",
|
||||||
|
Balance = "Balance",
|
||||||
|
["Beast Mastery"] = "Bestias",
|
||||||
|
Blood = "Sangre",
|
||||||
|
Brewmaster = "Maestro cervecero",
|
||||||
|
Combat = "Combate",
|
||||||
|
Demonology = "Demonología",
|
||||||
|
Destruction = "Destrucción",
|
||||||
|
Discipline = "Disciplina",
|
||||||
|
Elemental = "Elemental",
|
||||||
|
Enhancement = "Mejora",
|
||||||
|
Feral = "Feral",
|
||||||
|
["Feral Combat"] = "Combate feral",
|
||||||
|
Fire = "Fuego",
|
||||||
|
Frost = "Escarcha",
|
||||||
|
Fury = "Furia",
|
||||||
|
Guardian = "Guardián",
|
||||||
|
Holy = "Sagrado",
|
||||||
|
Hybrid = "Híbrido",
|
||||||
|
Marksmanship = "Puntería",
|
||||||
|
Mistweaver = "Tejedor de niebla",
|
||||||
|
Protection = "Protección",
|
||||||
|
Restoration = "Restauración",
|
||||||
|
Retribution = "Reprensión",
|
||||||
|
Shadow = "Sombra",
|
||||||
|
Subtlety = "Sutileza",
|
||||||
|
Survival = "Supervivencia",
|
||||||
|
Unholy = "Profano",
|
||||||
|
Windwalker = "Viajero del viento",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "ptBR" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "Suplício",
|
||||||
|
Arcane = "Arcano",
|
||||||
|
Arms = "Armas",
|
||||||
|
Assassination = "Assassinato",
|
||||||
|
Balance = "Equilíbrio",
|
||||||
|
["Beast Mastery"] = "Domínio das Feras",
|
||||||
|
Blood = "Sangue",
|
||||||
|
Brewmaster = "Mestre Cervejeiro",
|
||||||
|
Combat = "Combate",
|
||||||
|
Demonology = "Demonologia",
|
||||||
|
Destruction = "Destruição",
|
||||||
|
Discipline = "Disciplina",
|
||||||
|
Elemental = "Elemental",
|
||||||
|
Enhancement = "Aperfeiçoamento",
|
||||||
|
Feral = "Feral",
|
||||||
|
["Feral Combat"] = "Combate Feral",
|
||||||
|
Fire = "Fogo",
|
||||||
|
Frost = "Gelo",
|
||||||
|
Fury = "Fúria",
|
||||||
|
Guardian = "Guardião",
|
||||||
|
Holy = "Sagrado",
|
||||||
|
Hybrid = "Híbrido",
|
||||||
|
Marksmanship = "Precisão",
|
||||||
|
Mistweaver = "Tecelão da Névoa",
|
||||||
|
Protection = "Proteção",
|
||||||
|
Restoration = "Restauração",
|
||||||
|
Retribution = "Retribuição",
|
||||||
|
Shadow = "Sombra",
|
||||||
|
Subtlety = "Subterfúgio",
|
||||||
|
Survival = "Sobrevivência",
|
||||||
|
Unholy = "Profano",
|
||||||
|
Windwalker = "Andarilho do Vento",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "itIT" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "Afflizione",
|
||||||
|
Arcane = "Arcano",
|
||||||
|
Arms = "Armi",
|
||||||
|
Assassination = "Assassinio",
|
||||||
|
Balance = "Equilibrio",
|
||||||
|
["Beast Mastery"] = "Affinità Animale",
|
||||||
|
Blood = "Sangue",
|
||||||
|
Brewmaster = "Mastro Birraio",
|
||||||
|
Combat = "Combattimento",
|
||||||
|
Demonology = "Demonologia",
|
||||||
|
Destruction = "Distruzione",
|
||||||
|
Discipline = "Disciplina",
|
||||||
|
Elemental = "Elementale",
|
||||||
|
Enhancement = "Potenziamento",
|
||||||
|
Feral = "Aggressore Ferino",
|
||||||
|
["Feral Combat"] = "Combattimento Ferale",
|
||||||
|
Fire = "Fuoco",
|
||||||
|
Frost = "Ghiaccio",
|
||||||
|
Fury = "Furia",
|
||||||
|
Guardian = "Guardiano Ferino",
|
||||||
|
Holy = "Sacro",
|
||||||
|
Hybrid = "Ibrido",
|
||||||
|
Marksmanship = "Precisione di tiro",
|
||||||
|
Mistweaver = "Misticismo",
|
||||||
|
Protection = "Protezione",
|
||||||
|
Restoration = "Rigenerazione",
|
||||||
|
Retribution = "Castigo",
|
||||||
|
Shadow = "Ombra",
|
||||||
|
Subtlety = "Scaltrezza",
|
||||||
|
Survival = "Sopravvivenza",
|
||||||
|
Unholy = "Empietà",
|
||||||
|
Windwalker = "Impeto",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "ruRU" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "Колдовство",
|
||||||
|
Arcane = "Тайная магия",
|
||||||
|
Arms = "Оружие",
|
||||||
|
Assassination = "Убийство",
|
||||||
|
Balance = "Баланс",
|
||||||
|
["Beast Mastery"] = "Чувство зверя",
|
||||||
|
Blood = "Кровь",
|
||||||
|
Brewmaster = "Хмелевар",
|
||||||
|
Combat = "Бой",
|
||||||
|
Demonology = "Демонология",
|
||||||
|
Destruction = "Разрушение",
|
||||||
|
Discipline = "Послушание",
|
||||||
|
Elemental = "Укрощение стихии",
|
||||||
|
Enhancement = "Совершенствование",
|
||||||
|
Feral = "Сила зверя",
|
||||||
|
["Feral Combat"] = "Сила зверя",
|
||||||
|
Fire = "Огонь",
|
||||||
|
Frost = "Лед",
|
||||||
|
Fury = "Неистовство",
|
||||||
|
Guardian = "Страж",
|
||||||
|
Holy = "Свет",
|
||||||
|
Hybrid = "Гибрид",
|
||||||
|
Marksmanship = "Стрельба",
|
||||||
|
Mistweaver = "Ткач туманов",
|
||||||
|
Protection = "Защита",
|
||||||
|
Restoration = "Исцеление",
|
||||||
|
Retribution = "Возмездие",
|
||||||
|
Shadow = "Темная магия",
|
||||||
|
Subtlety = "Скрытность",
|
||||||
|
Survival = "Выживание",
|
||||||
|
Unholy = "Нечестивость",
|
||||||
|
Windwalker = "Танцующий с ветром",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "zhCN" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "痛苦",
|
||||||
|
Arcane = "奥术",
|
||||||
|
Arms = "武器",
|
||||||
|
Assassination = "刺杀",
|
||||||
|
Balance = "平衡",
|
||||||
|
["Beast Mastery"] = "野兽控制",
|
||||||
|
Blood = "鲜血",
|
||||||
|
Brewmaster = "酒仙",
|
||||||
|
Combat = "战斗",
|
||||||
|
Demonology = "恶魔学识",
|
||||||
|
Destruction = "毁灭",
|
||||||
|
Discipline = "戒律",
|
||||||
|
Elemental = "元素战斗",
|
||||||
|
Enhancement = "增强",
|
||||||
|
Feral = "野性",
|
||||||
|
["Feral Combat"] = "野性战斗",
|
||||||
|
Fire = "火焰",
|
||||||
|
Frost = "冰霜",
|
||||||
|
Fury = "狂怒",
|
||||||
|
Guardian = "守护",
|
||||||
|
Holy = "神圣",
|
||||||
|
Hybrid = "混合",
|
||||||
|
Marksmanship = "射击",
|
||||||
|
Mistweaver = "织雾",
|
||||||
|
Protection = "防护",
|
||||||
|
Restoration = "恢复",
|
||||||
|
Retribution = "惩戒",
|
||||||
|
Shadow = "暗影魔法",
|
||||||
|
Subtlety = "敏锐",
|
||||||
|
Survival = "生存技能",
|
||||||
|
Unholy = "邪恶",
|
||||||
|
Windwalker = "踏风",
|
||||||
|
}
|
||||||
|
elseif GAME_LOCALE == "zhTW" then
|
||||||
|
lib:SetCurrentTranslations {
|
||||||
|
Affliction = "痛苦",
|
||||||
|
Arcane = "秘法",
|
||||||
|
Arms = "武器",
|
||||||
|
Assassination = "刺殺",
|
||||||
|
Balance = "平衡",
|
||||||
|
["Beast Mastery"] = "野獸控制",
|
||||||
|
Blood = "血魄",
|
||||||
|
Brewmaster = "釀酒",
|
||||||
|
Combat = "戰鬥",
|
||||||
|
Demonology = "惡魔學識",
|
||||||
|
Destruction = "毀滅",
|
||||||
|
Discipline = "戒律",
|
||||||
|
Elemental = "元素",
|
||||||
|
Enhancement = "增強",
|
||||||
|
Feral = "野性戰鬥",
|
||||||
|
["Feral Combat"] = "野性戰鬥",
|
||||||
|
Fire = "火焰",
|
||||||
|
Frost = "冰霜",
|
||||||
|
Fury = "狂怒",
|
||||||
|
Guardian = "守護者",
|
||||||
|
Holy = "神聖",
|
||||||
|
Hybrid = "混合",
|
||||||
|
Marksmanship = "射擊",
|
||||||
|
Mistweaver = "織霧",
|
||||||
|
Protection = "防護",
|
||||||
|
Restoration = "恢復",
|
||||||
|
Retribution = "懲戒",
|
||||||
|
Shadow = "暗影",
|
||||||
|
Subtlety = "敏銳",
|
||||||
|
Survival = "生存",
|
||||||
|
Unholy = "穢邪",
|
||||||
|
Windwalker = "御風",
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
error(("%s: Locale %q not supported"):format(MAJOR_VERSION, GAME_LOCALE))
|
||||||
|
end
|
|
@ -0,0 +1,21 @@
|
||||||
|
## Interface: 60000
|
||||||
|
## LoadOnDemand: 1
|
||||||
|
## Title: Lib: Babble-TalentTree-3.0
|
||||||
|
## Notes: A library to help with localization of talent trees.
|
||||||
|
## Notes-deDE: BabbleLib ist eine Bibliothek, die bei der Lokalisierung helfen soll.
|
||||||
|
## Notes-esES: Una biblioteca para ayudar con las localizaciones.
|
||||||
|
## Notes-frFR: Une bibliothèque d'aide à la localisation.
|
||||||
|
## Notes-ruRU: Библиотека для локализации аддонов.
|
||||||
|
## Notes-zhCN: 为本地化服务的支持库[声望阵营]
|
||||||
|
## Notes-zhTW: 為本地化服務的函式庫[聲望陣營]
|
||||||
|
## Author: Pneumatus
|
||||||
|
## X-Category: Library
|
||||||
|
## X-License: MIT
|
||||||
|
## X-Curse-Packaged-Version: 6.0-release3
|
||||||
|
## X-Curse-Project-Name: LibBabble-TalentTree-3.0
|
||||||
|
## X-Curse-Project-ID: libbabble-talenttree-3-0
|
||||||
|
## X-Curse-Repository-ID: wow/libbabble-talenttree-3-0/mainline
|
||||||
|
|
||||||
|
LibStub\LibStub.lua
|
||||||
|
lib.xml
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
-- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
|
||||||
|
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info
|
||||||
|
-- LibStub is hereby placed in the Public Domain
|
||||||
|
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
|
||||||
|
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
|
||||||
|
local LibStub = _G[LIBSTUB_MAJOR]
|
||||||
|
|
||||||
|
-- Check to see is this version of the stub is obsolete
|
||||||
|
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
|
||||||
|
LibStub = LibStub or {libs = {}, minors = {} }
|
||||||
|
_G[LIBSTUB_MAJOR] = LibStub
|
||||||
|
LibStub.minor = LIBSTUB_MINOR
|
||||||
|
|
||||||
|
-- LibStub:NewLibrary(major, minor)
|
||||||
|
-- major (string) - the major version of the library
|
||||||
|
-- minor (string or number ) - the minor version of the library
|
||||||
|
--
|
||||||
|
-- returns nil if a newer or same version of the lib is already present
|
||||||
|
-- returns empty library object or old library object if upgrade is needed
|
||||||
|
function LibStub:NewLibrary(major, minor)
|
||||||
|
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
|
||||||
|
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
|
||||||
|
|
||||||
|
local oldminor = self.minors[major]
|
||||||
|
if oldminor and oldminor >= minor then return nil end
|
||||||
|
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
|
||||||
|
return self.libs[major], oldminor
|
||||||
|
end
|
||||||
|
|
||||||
|
-- LibStub:GetLibrary(major, [silent])
|
||||||
|
-- major (string) - the major version of the library
|
||||||
|
-- silent (boolean) - if true, library is optional, silently return nil if its not found
|
||||||
|
--
|
||||||
|
-- throws an error if the library can not be found (except silent is set)
|
||||||
|
-- returns the library object if found
|
||||||
|
function LibStub:GetLibrary(major, silent)
|
||||||
|
if not self.libs[major] and not silent then
|
||||||
|
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
|
||||||
|
end
|
||||||
|
return self.libs[major], self.minors[major]
|
||||||
|
end
|
||||||
|
|
||||||
|
-- LibStub:IterateLibraries()
|
||||||
|
--
|
||||||
|
-- Returns an iterator for the currently registered libraries
|
||||||
|
function LibStub:IterateLibraries()
|
||||||
|
return pairs(self.libs)
|
||||||
|
end
|
||||||
|
|
||||||
|
setmetatable(LibStub, { __call = LibStub.GetLibrary })
|
||||||
|
end
|
|
@ -0,0 +1,13 @@
|
||||||
|
## Interface: 60000
|
||||||
|
## Title: Lib: LibStub
|
||||||
|
## Notes: Universal Library Stub
|
||||||
|
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
|
||||||
|
## X-Website: http://www.wowace.com/addons/libstub/
|
||||||
|
## X-Category: Library
|
||||||
|
## X-License: Public Domain
|
||||||
|
## X-Curse-Packaged-Version: 1.0.2.60000
|
||||||
|
## X-Curse-Project-Name: LibStub
|
||||||
|
## X-Curse-Project-ID: libstub
|
||||||
|
## X-Curse-Repository-ID: wow/libstub/mainline
|
||||||
|
|
||||||
|
LibStub.lua
|
|
@ -0,0 +1,41 @@
|
||||||
|
debugstack = debug.traceback
|
||||||
|
strmatch = string.match
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy
|
||||||
|
assert(lib) -- should return the library table
|
||||||
|
assert(not oldMinor) -- should not return the old minor, since it didn't exist
|
||||||
|
|
||||||
|
-- the following is to create data and then be able to check if the same data exists after the fact
|
||||||
|
function lib:MyMethod()
|
||||||
|
end
|
||||||
|
local MyMethod = lib.MyMethod
|
||||||
|
lib.MyTable = {}
|
||||||
|
local MyTable = lib.MyTable
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 1) -- try to register a library with the same version, should silently fail
|
||||||
|
assert(not newLib) -- should not return since out of date
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 0) -- try to register a library with a previous, should silently fail
|
||||||
|
assert(not newLib) -- should not return since out of date
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 2) -- register a new version
|
||||||
|
assert(newLib) -- library table
|
||||||
|
assert(rawequal(newLib, lib)) -- should be the same reference as the previous
|
||||||
|
assert(newOldMinor == 1) -- should return the minor version of the previous version
|
||||||
|
|
||||||
|
assert(rawequal(lib.MyMethod, MyMethod)) -- verify that values were saved
|
||||||
|
assert(rawequal(lib.MyTable, MyTable)) -- verify that values were saved
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 3 Blah") -- register a new version with a string minor version (instead of a number)
|
||||||
|
assert(newLib) -- library table
|
||||||
|
assert(newOldMinor == 2) -- previous version was 2
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 4 and please ignore 15 Blah") -- register a new version with a string minor version (instead of a number)
|
||||||
|
assert(newLib)
|
||||||
|
assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string)
|
||||||
|
|
||||||
|
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
|
||||||
|
assert(newLib)
|
||||||
|
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
|
|
@ -0,0 +1,27 @@
|
||||||
|
debugstack = debug.traceback
|
||||||
|
strmatch = string.match
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
for major, library in LibStub:IterateLibraries() do
|
||||||
|
-- check that MyLib doesn't exist yet, by iterating through all the libraries
|
||||||
|
assert(major ~= "MyLib")
|
||||||
|
end
|
||||||
|
|
||||||
|
assert(not LibStub:GetLibrary("MyLib", true)) -- check that MyLib doesn't exist yet by direct checking
|
||||||
|
assert(not pcall(LibStub.GetLibrary, LibStub, "MyLib")) -- don't silently fail, thus it should raise an error.
|
||||||
|
local lib = LibStub:NewLibrary("MyLib", 1) -- create the lib
|
||||||
|
assert(lib) -- check it exists
|
||||||
|
assert(rawequal(LibStub:GetLibrary("MyLib"), lib)) -- verify that :GetLibrary("MyLib") properly equals the lib reference
|
||||||
|
|
||||||
|
assert(LibStub:NewLibrary("MyLib", 2)) -- create a new version
|
||||||
|
|
||||||
|
local count=0
|
||||||
|
for major, library in LibStub:IterateLibraries() do
|
||||||
|
-- check that MyLib exists somewhere in the libraries, by iterating through all the libraries
|
||||||
|
if major == "MyLib" then -- we found it!
|
||||||
|
count = count +1
|
||||||
|
assert(rawequal(library, lib)) -- verify that the references are equal
|
||||||
|
end
|
||||||
|
end
|
||||||
|
assert(count == 1) -- verify that we actually found it, and only once
|
|
@ -0,0 +1,14 @@
|
||||||
|
debugstack = debug.traceback
|
||||||
|
strmatch = string.match
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
local proxy = newproxy() -- non-string
|
||||||
|
|
||||||
|
assert(not pcall(LibStub.NewLibrary, LibStub, proxy, 1)) -- should error, proxy is not a string, it's userdata
|
||||||
|
local success, ret = pcall(LibStub.GetLibrary, proxy, true)
|
||||||
|
assert(not success or not ret) -- either error because proxy is not a string or because it's not actually registered.
|
||||||
|
|
||||||
|
assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
|
||||||
|
|
||||||
|
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
|
|
@ -0,0 +1,41 @@
|
||||||
|
debugstack = debug.traceback
|
||||||
|
strmatch = string.match
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
|
||||||
|
-- Pretend like loaded libstub is old and doesn't have :IterateLibraries
|
||||||
|
assert(LibStub.minor)
|
||||||
|
LibStub.minor = LibStub.minor - 0.0001
|
||||||
|
LibStub.IterateLibraries = nil
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
assert(type(LibStub.IterateLibraries)=="function")
|
||||||
|
|
||||||
|
|
||||||
|
-- Now pretend that we're the same version -- :IterateLibraries should NOT be re-created
|
||||||
|
LibStub.IterateLibraries = 123
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
assert(LibStub.IterateLibraries == 123)
|
||||||
|
|
||||||
|
|
||||||
|
-- Now pretend that a newer version is loaded -- :IterateLibraries should NOT be re-created
|
||||||
|
LibStub.minor = LibStub.minor + 0.0001
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
assert(LibStub.IterateLibraries == 123)
|
||||||
|
|
||||||
|
|
||||||
|
-- Again with a huge number
|
||||||
|
LibStub.minor = LibStub.minor + 1234567890
|
||||||
|
|
||||||
|
loadfile("../LibStub.lua")()
|
||||||
|
|
||||||
|
assert(LibStub.IterateLibraries == 123)
|
||||||
|
|
||||||
|
|
||||||
|
print("OK")
|
|
@ -0,0 +1,5 @@
|
||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||||
|
..\FrameXML\UI.xsd">
|
||||||
|
<Script file="LibBabble-3.0.lua" />
|
||||||
|
<Script file="LibBabble-TalentTree-3.0.lua" />
|
||||||
|
</Ui>
|
Loading…
Reference in New Issue