You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.7 KiB

---@class XLootAddon
local XLoot = select(2, ...)
local function CompileLocales(locales)
local L = locales[GetLocale()] and locales[GetLocale()] or locales.enUS
if L ~= locales.enUS then
setmetatable(L, { __index = locales.enUS })
for k, v in pairs(L) do
if type(v) == 'table' then
setmetatable(v, { __index = locales.enUS[k] })
end
end
end
return L
end
-- locales expects table: { enUS = {...}, ... }
function XLoot:Localize(name, locales)
-- We need to extract the root namespace due to how Curse is currently doing localizations.
for _,t in pairs(locales) do
if t[name] then
for k, v in pairs(t[name]) do
t[k] = v
end
t[name] = nil
end
end
self["L_"..name] = CompileLocales(locales)
end
local locales = {
enUS = {
skin_svelte = "XLoot: Svelte",
skin_legacy = "XLoot: Legacy",
skin_smooth = "XLoot: Smooth",
anchor_hide = "hide",
anchor_hide_desc = "Lock this module in position\nThis will hide the anchor,\nbut it can be shown again from the options",
},
-- Possibly localized
ptBR = {},
frFR = {},
deDE = {},
koKR = {},
esMX = {},
ruRU = {},
zhCN = {},
esES = {},
zhTW = {},
}
-- Automatically inserted translations
5 years ago
locales.ptBR["Core"] = {
}
5 years ago
locales.frFR["Core"] = {
}
5 years ago
locales.deDE["Core"] = {
["anchor_hide"] = "verstecken",
["skin_legacy"] = "XLoot: Legacy",
["skin_smooth"] = "XLoot: Smooth",
["skin_svelte"] = "XLoot: Svelte",
}
5 years ago
locales.koKR["Core"] = {
["anchor_hide"] = "감춤",
["anchor_hide_desc"] = [=[ .
,
5 years ago
.]=],
["skin_legacy"] = "XLoot: Legacy",
["skin_smooth"] = "XLoot: Smooth",
["skin_svelte"] = "XLoot: Svelte",
}
5 years ago
locales.esMX["Core"] = {
}
5 years ago
locales.ruRU["Core"] = {
["anchor_hide"] = "скрыть ",
["anchor_hide_desc"] = [=[Заблокируйте положение этого модуля
Это позволит скрыть якорь,
5 years ago
но он может быть показан еще раз в настройках]=],
["skin_legacy"] = "XLoot: Legacy",
["skin_smooth"] = "XLoot: Smooth",
["skin_svelte"] = "XLoot: Svelte",
}
5 years ago
locales.zhCN["Core"] = {
["anchor_hide"] = "隐藏",
["anchor_hide_desc"] = [=[
]=],
["skin_legacy"] = "XLoot: Legacy",
["skin_smooth"] = "XLoot: Smooth",
["skin_svelte"] = "XLoot: Svelte",
}
5 years ago
locales.esES["Core"] = {
}
5 years ago
locales.zhTW["Core"] = {
["anchor_hide"] = "隱藏",
["anchor_hide_desc"] = [=[
,
]=],
["skin_legacy"] = "XLoot: 傳統",
["skin_smooth"] = "XLoot: 滑順",
["skin_svelte"] = "XLoot: 苗條",
}
XLoot.L = CompileLocales(locales)