Add more localizations
Add more localization..
This commit is contained in:
@@ -85,6 +85,14 @@ function shared.CombatAlerter.Init()
|
|||||||
print(string.format("[%s] Queuing alert message: '%s'", ModuleName, msg.message))
|
print(string.format("[%s] Queuing alert message: '%s'", ModuleName, msg.message))
|
||||||
end
|
end
|
||||||
table.insert(shared.messenger.queue, msg)
|
table.insert(shared.messenger.queue, msg)
|
||||||
|
if not shared.L.ru.zones[zone] then
|
||||||
|
print(string.format("[%s] Zone %s not found in ru.zones", ModuleName, zone))
|
||||||
|
end
|
||||||
|
zone = shared.L.ru.zones[zone] or zone
|
||||||
|
if not shared.L.ru.zones[subZone] then
|
||||||
|
print(string.format("[%s] Subzone %s not found in ru.zones", ModuleName, subZone))
|
||||||
|
end
|
||||||
|
subZone = shared.L.ru.zones[subZone] or subZone
|
||||||
|
|
||||||
---@type Message
|
---@type Message
|
||||||
msg = {
|
msg = {
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ function shared.DeathReporter.Init()
|
|||||||
local msg = {
|
local msg = {
|
||||||
channel = "CHANNEL",
|
channel = "CHANNEL",
|
||||||
data = Heimdall_Data.config.deathReporter.masterChannel,
|
data = Heimdall_Data.config.deathReporter.masterChannel,
|
||||||
message = string.format(shared.L.en.deathReporterDeath,
|
message = string.format(shared.L.en.killed,
|
||||||
source,
|
source,
|
||||||
destination,
|
destination,
|
||||||
spellName,
|
spellName,
|
||||||
@@ -107,16 +107,25 @@ function shared.DeathReporter.Init()
|
|||||||
print(string.format("[%s] Adding message to queue: %s", ModuleName, msg.message))
|
print(string.format("[%s] Adding message to queue: %s", ModuleName, msg.message))
|
||||||
end
|
end
|
||||||
table.insert(shared.messenger.queue, msg)
|
table.insert(shared.messenger.queue, msg)
|
||||||
|
local zone, subZone = GetZoneText(), GetSubZoneText()
|
||||||
|
if not shared.L.ru.zones[zone] then
|
||||||
|
print(string.format("[%s] Zone %s not found in ru.zones", ModuleName, zone))
|
||||||
|
end
|
||||||
|
zone = shared.L.ru.zones[zone] or zone
|
||||||
|
if not shared.L.ru.zones[subZone] then
|
||||||
|
print(string.format("[%s] Subzone %s not found in ru.zones", ModuleName, subZone))
|
||||||
|
end
|
||||||
|
subZone = shared.L.ru.zones[subZone] or subZone
|
||||||
|
|
||||||
---@type Message
|
---@type Message
|
||||||
msg = {
|
msg = {
|
||||||
channel = "CHANNEL",
|
channel = "CHANNEL",
|
||||||
data = Heimdall_Data.config.deathReporter.masterChannel .. "ru",
|
data = Heimdall_Data.config.deathReporter.masterChannel .. "ru",
|
||||||
message = string.format(shared.L.ru.deathReporterDeath,
|
message = string.format(shared.L.ru.killed,
|
||||||
source,
|
source,
|
||||||
destination,
|
destination,
|
||||||
spellName,
|
spellName,
|
||||||
location,
|
string.format("%s (%s)", zone, subZone),
|
||||||
tostring(GetCurrentMapAreaID()),
|
tostring(GetCurrentMapAreaID()),
|
||||||
x * 100, y * 100)
|
x * 100, y * 100)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,14 +157,14 @@ function shared.Spotter.Init()
|
|||||||
SetMapToCurrentZone()
|
SetMapToCurrentZone()
|
||||||
SetMapByID(GetCurrentMapAreaID())
|
SetMapByID(GetCurrentMapAreaID())
|
||||||
local text = string.format(shared.L.en.spotterSpotted,
|
local text = string.format(shared.L.en.spotterSpotted,
|
||||||
hostile and "Hostile" or "Friendly",
|
hostile and shared.L.en.tidbits.hostile or shared.L.en.tidbits.friendly,
|
||||||
name,
|
name,
|
||||||
class,
|
class,
|
||||||
stinky and string.format("(%s)", "!!!!") or "",
|
stinky and string.format("(%s)", "!!!!") or "",
|
||||||
race,
|
race,
|
||||||
faction,
|
faction,
|
||||||
FormatHP(hp),
|
string.gsub(FormatHP(hp), "M", "kk"),
|
||||||
FormatHP(maxHp),
|
string.gsub(FormatHP(maxHp), "M", "kk"),
|
||||||
location,
|
location,
|
||||||
tostring(GetCurrentMapAreaID()),
|
tostring(GetCurrentMapAreaID()),
|
||||||
x * 100, y * 100)
|
x * 100, y * 100)
|
||||||
@@ -181,16 +181,38 @@ function shared.Spotter.Init()
|
|||||||
}
|
}
|
||||||
table.insert(shared.messenger.queue, msg)
|
table.insert(shared.messenger.queue, msg)
|
||||||
|
|
||||||
|
local ruClass = shared.L.ru.classes[class]
|
||||||
|
if not ruClass then
|
||||||
|
print(string.format("[%s] Class %s not found in ru.classes", ModuleName, class))
|
||||||
|
end
|
||||||
|
local ruRace = shared.L.ru.races[race]
|
||||||
|
if not ruRace then
|
||||||
|
print(string.format("[%s] Race %s not found in ru.races", ModuleName, race))
|
||||||
|
end
|
||||||
|
local ruFaction = shared.L.ru.factions[faction]
|
||||||
|
if not ruFaction then
|
||||||
|
print(string.format("[%s] Faction %s not found in ru.factions", ModuleName, faction))
|
||||||
|
end
|
||||||
|
local zone, subzone = GetZoneText(), GetSubZoneText()
|
||||||
|
local ruZone = shared.L.ru.zones[zone]
|
||||||
|
if not ruZone then
|
||||||
|
print(string.format("[%s] Zone %s not found in ru.zones", ModuleName, zone))
|
||||||
|
end
|
||||||
|
local ruSubzone = shared.L.ru.zones[subzone]
|
||||||
|
if not ruSubzone then
|
||||||
|
print(string.format("[%s] Subzone %s not found in ru.zones", ModuleName, subzone))
|
||||||
|
end
|
||||||
|
|
||||||
text = string.format(shared.L.ru.spotterSpotted,
|
text = string.format(shared.L.ru.spotterSpotted,
|
||||||
hostile and "Hostile" or "Friendly",
|
hostile and shared.L.ru.tidbits.hostile or shared.L.ru.tidbits.friendly,
|
||||||
name,
|
name,
|
||||||
class,
|
ruClass or class,
|
||||||
stinky and string.format("(%s)", "!!!!") or "",
|
stinky and string.format("(%s)", "!!!!") or "",
|
||||||
race,
|
ruRace or race,
|
||||||
faction,
|
ruFaction or faction,
|
||||||
FormatHP(hp),
|
FormatHP(hp),
|
||||||
FormatHP(maxHp),
|
FormatHP(maxHp),
|
||||||
location,
|
string.format("%s (%s)", ruZone or zone, ruSubzone or subzone),
|
||||||
tostring(GetCurrentMapAreaID()),
|
tostring(GetCurrentMapAreaID()),
|
||||||
x * 100, y * 100)
|
x * 100, y * 100)
|
||||||
|
|
||||||
|
|||||||
@@ -73,12 +73,28 @@ function shared.Whoer.Init()
|
|||||||
end,
|
end,
|
||||||
---@return string
|
---@return string
|
||||||
NotifyRu = function(self)
|
NotifyRu = function(self)
|
||||||
|
local ruClass = shared.L.ru.classes[self.class]
|
||||||
|
if not ruClass then
|
||||||
|
print(string.format("[%s] Class %s not found in ru.classes", ModuleName, self.class))
|
||||||
|
end
|
||||||
|
|
||||||
|
local ruRace = shared.L.ru.races[self.race]
|
||||||
|
if not ruRace then
|
||||||
|
print(string.format("[%s] Race %s not found in ru.races", ModuleName, self.race))
|
||||||
|
end
|
||||||
|
|
||||||
|
local faction = shared.raceMap[self.race]
|
||||||
|
local ruFaction = shared.L.ru.factions[faction]
|
||||||
|
if not ruFaction then
|
||||||
|
print(string.format("[%s] Faction %s not found in ru.factions", ModuleName, faction))
|
||||||
|
end
|
||||||
|
|
||||||
local text = string.format(shared.L.ru.whoerNew,
|
local text = string.format(shared.L.ru.whoerNew,
|
||||||
self.name,
|
self.name,
|
||||||
self.stinky and "(!!!!)" or "",
|
self.stinky and "(!!!!)" or "",
|
||||||
self.class,
|
ruClass or self.class,
|
||||||
self.race,
|
ruRace or self.race,
|
||||||
tostring(shared.raceMap[self.race]),
|
ruFaction or faction,
|
||||||
self.guild,
|
self.guild,
|
||||||
self.zone,
|
self.zone,
|
||||||
self.firstSeen,
|
self.firstSeen,
|
||||||
|
|||||||
61
_L.lua
61
_L.lua
@@ -8,13 +8,72 @@ shared.L = {
|
|||||||
whoerNew = "%s %s of class %s, race %s (%s) and guild %s in %s, first seen: %s, last seen: %s, times seen: %d",
|
whoerNew = "%s %s of class %s, race %s (%s) and guild %s in %s, first seen: %s, last seen: %s, times seen: %d",
|
||||||
whoerMoved = "%s of class %s (%s - %s) and guild %s moved to %s",
|
whoerMoved = "%s of class %s (%s - %s) and guild %s moved to %s",
|
||||||
whoerGone = "%s of class %s and guild %s left %s",
|
whoerGone = "%s of class %s and guild %s left %s",
|
||||||
|
killed = "%s killed %s with %s in %s (%s) at [%s](%2.2f, %2.2f)",
|
||||||
|
tidbits = {
|
||||||
|
hostile = "hostile",
|
||||||
|
friendly = "friendly",
|
||||||
|
unknown = "unknown",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
ru = {
|
ru = {
|
||||||
combatAlerterInCombat = "Я в бою с %s на %s (%s) на [%s](%2.2f, %2.2f)",
|
combatAlerterInCombat = "Я в бою с %s на %s (%s) на [%s](%2.2f, %2.2f)",
|
||||||
snifferStinky = "Я чувствую запах %s",
|
snifferStinky = "Я чувствую запах %s",
|
||||||
spotterSpotted = "Я вижу (%s) %s/%s %s (%s) с %s/%s здоровьем на %s [%s](%2.2f, %2.2f)",
|
spotterSpotted = "Я вижу (%s) %s/%s %s (%s) с %s/%s здоровьем на %s [%s](%2.2f, %2.2f)",
|
||||||
whoerNew = "%s %s класса %s, расы %s (%s) и гильдии %s в %s, первый раз видели: %s, последний раз видели: %s, раз видели: %d",
|
whoerNew =
|
||||||
|
"%s %s класса %s, расы %s (%s) и гильдии %s в %s, первый раз видели: %s, последний раз видели: %s, раз видели: %d",
|
||||||
whoerMoved = "%s класса %s (%s - %s) и гильдии %s переместился в %s",
|
whoerMoved = "%s класса %s (%s - %s) и гильдии %s переместился в %s",
|
||||||
whoerGone = "%s класса %s и гильдии %s покинул %s",
|
whoerGone = "%s класса %s и гильдии %s покинул %s",
|
||||||
|
killed = "%s убил %s с %s в %s (%s) на [%s](%2.2f, %2.2f)",
|
||||||
|
-- A lot of this shit I get straight from the API in english (my locale)
|
||||||
|
-- So there is no need to translate it from english to english
|
||||||
|
tidbits = {
|
||||||
|
hostile = "враждебный",
|
||||||
|
friendly = "дружественный",
|
||||||
|
unknown = "неизвестный",
|
||||||
|
},
|
||||||
|
zones = {
|
||||||
|
["Orgrimmar"] = "Оргриммар",
|
||||||
|
["Valley of Strength"] = "Долина Силы",
|
||||||
|
["Valley of Trials"] = "Долина Испытаний",
|
||||||
|
["Durotar"] = "Дуротар",
|
||||||
|
["Echo Isles"] = "Острова Эхо",
|
||||||
|
},
|
||||||
|
classes = {
|
||||||
|
["Hunter"] = "Охотник",
|
||||||
|
["Warrior"] = "Воин",
|
||||||
|
["Mage"] = "Маг",
|
||||||
|
["Priest"] = "Жрец",
|
||||||
|
["Paladin"] = "Паладин",
|
||||||
|
["Shaman"] = "Шаман",
|
||||||
|
["Rogue"] = "Разбойник",
|
||||||
|
["Warlock"] = "Чернокнижник",
|
||||||
|
["Druid"] = "Друид",
|
||||||
|
["Death Knight"] = "Рыцарь Смерти",
|
||||||
|
["Monk"] = "Монах",
|
||||||
|
["Demon Hunter"] = "Демон Хламер",
|
||||||
|
["Evoker"] = "Эвокер",
|
||||||
|
},
|
||||||
|
races = {
|
||||||
|
["Human"] = "Человек",
|
||||||
|
["Orc"] = "Орк",
|
||||||
|
["Dwarf"] = "Дворф",
|
||||||
|
["Night Elf"] = "Ночной Эльф",
|
||||||
|
["Tauren"] = "Таурен",
|
||||||
|
["Gnome"] = "Гном",
|
||||||
|
["Troll"] = "Тролль",
|
||||||
|
["Goblin"] = "Гоблин",
|
||||||
|
["Blood Elf"] = "Кровавый Эльф",
|
||||||
|
["Draenei"] = "Дреней",
|
||||||
|
["Worgen"] = "Ворген",
|
||||||
|
["Pandaren"] = "Пандарен",
|
||||||
|
["Zandalari"] = "Зандалари",
|
||||||
|
["Mechagnome"] = "Механом",
|
||||||
|
["Vulpera"] = "Вульперы",
|
||||||
|
["Undead"] = "Нежить",
|
||||||
|
},
|
||||||
|
factions = {
|
||||||
|
["Alliance"] = "Альянс",
|
||||||
|
["Horde"] = "Орда",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user