Add russian locale

Poorly... But it'll do for now
This commit is contained in:
2025-01-09 20:58:17 +01:00
parent 12e0c23ea9
commit abb8540c12
6 changed files with 132 additions and 9 deletions

View File

@@ -58,8 +58,22 @@ function shared.Whoer.Init()
end,
---@return string
NotifyMessage = function(self)
local text = string.format(
"%s %s of class %s, race %s (%s) and guild %s in %s, first seen: %s, last seen: %s, times seen: %d",
local text = string.format(shared.L.en.whoerNew,
self.name,
self.stinky and "(!!!!)" or "",
self.class,
self.race,
tostring(shared.raceMap[self.race]),
self.guild,
self.zone,
self.firstSeen,
self.lastSeen,
self.seenCount)
return text
end,
---@return string
NotifyRu = function(self)
local text = string.format(shared.L.ru.whoerNew,
self.name,
self.stinky and "(!!!!)" or "",
self.class,
@@ -173,7 +187,7 @@ function shared.Whoer.Init()
if Heimdall_Data.config.who.doWhisper then
if Heimdall_Data.config.who.debug then
print(string.format("[%s] Processing whisper notifications for %d recipients", ModuleName,
#Heimdall_Data.config.whisperNotify))
#Heimdall_Data.config.whisperNotify))
end
for _, name in pairs(Heimdall_Data.config.whisperNotify) do
---@type Message
@@ -201,7 +215,7 @@ function shared.Whoer.Init()
and not Heimdall_Data.config.who.zoneNotifyFor[player.zone] then
return string.format("Not notifying for zones %s and %s", tostring(zone), tostring(player.zone))
end
local text = string.format("%s of class %s (%s - %s) and guild %s moved to %s",
local text = string.format(shared.L.en.whoerMoved,
player.name,
player.class,
player.race,
@@ -217,6 +231,22 @@ function shared.Whoer.Init()
}
table.insert(shared.messenger.queue, msg)
text = string.format(shared.L.ru.whoerMoved,
player.name,
player.class,
player.race,
shared.raceMap[player.race] or "Unknown",
player.guild,
zone)
---@type Message
msg = {
channel = "CHANNEL",
data = Heimdall_Data.config.who.notifyChannel .. "ru",
message = text
}
table.insert(shared.messenger.queue, msg)
if Heimdall_Data.config.who.doWhisper then
for _, name in pairs(Heimdall_Data.config.whisperNotify) do
---@type Message
@@ -241,7 +271,7 @@ function shared.Whoer.Init()
tostring(player.zone))
end
local text = string.format("%s of class %s and guild %s left %s",
local text = string.format(shared.L.en.whoerGone,
player.name,
player.class,
player.guild,
@@ -255,6 +285,20 @@ function shared.Whoer.Init()
}
table.insert(shared.messenger.queue, msg)
text = string.format(shared.L.ru.whoerGone,
player.name,
player.class,
player.guild,
player.zone)
---@type Message
msg = {
channel = "CHANNEL",
data = Heimdall_Data.config.who.notifyChannel .. "ru",
message = text
}
table.insert(shared.messenger.queue, msg)
if Heimdall_Data.config.who.doWhisper then
for _, name in pairs(Heimdall_Data.config.whisperNotify) do
---@type Message