Skip to content

Commit cf10778

Browse files
committed
Localization
1 parent 38946b5 commit cf10778

File tree

8 files changed

+37
-16
lines changed

8 files changed

+37
-16
lines changed

gamemode/core/derma/mainmenu/character.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ function PANEL:createSelectedCharacterInfoPanel(character)
513513
self.selectBtn.DoClick = function()
514514
if character:isBanned() then
515515
local characterName = character:getName()
516-
Derma_Query("Your character: " .. characterName .. ", has been permanently killed. An administrator has approved this PK.\nPKs are a regular part of RP; you can always make a new character. Have fun!", "Permanent Kill", "I aknowledge.", function() end)
516+
Derma_Query(L("pkDialogMessage", characterName), L("permaKillTitle"), L("iAcknowledge"), function() end)
517517
else
518518
lia.module.list["mainmenu"]:chooseCharacter(character:getID()):catch(function(err) if err and err ~= "" then LocalPlayer():notifyLocalized(err) end end)
519519
self:Remove()

gamemode/core/derma/skins/skin.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,5 +302,5 @@ function SKIN:PaintMenuBar(panel, w, h)
302302
drawAltBg(panel, w, h)
303303
end
304304

305-
derma.DefineSkin("Lilia Skin", "The skin for the Lilia framework.", SKIN)
305+
derma.DefineSkin("Lilia Skin", L("liliaSkinDesc"), SKIN)
306306
derma.RefreshSkins()

gamemode/core/derma/skins/skin_alt.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,5 +350,5 @@ function SKIN:PaintMenuBar(_, w, h)
350350
basePaint(w, h)
351351
end
352352

353-
derma.DefineSkin("Lilia Alt Skin", "The alt skin for the Lilia framework.", SKIN)
353+
derma.DefineSkin("Lilia Alt Skin", L("liliaAltSkinDesc"), SKIN)
354354
derma.RefreshSkins()

gamemode/languages/english.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,4 +1621,11 @@ Reload: Drop]],
16211621
viewEvidence = "View Evidence",
16221622
banCharacterOffline = "Ban Character (Offline)",
16231623
unbanCharacterOffline = "Unban Character (Offline)",
1624-
}
1624+
evidenceInvalidURL = "Evidence must be a valid URL.",
1625+
pkDialogMessage = "Your character: %s, has been permanently killed. An administrator has approved this PK.\nPKs are a regular part of RP; you can always make a new character. Have fun!",
1626+
permaKillTitle = "Permanent Kill",
1627+
iAcknowledge = "I acknowledge",
1628+
liliaSkinDesc = "The skin for the Lilia framework.",
1629+
liliaAltSkinDesc = "The alt skin for the Lilia framework.",
1630+
needModel = "You need to choose a valid model.",
1631+
}

gamemode/modules/administration/commands.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ lia.command.add("charkill", {
221221
local reason = data[reasonKey]
222222
local evidence = data[evidenceKey]
223223
if not (isstring(evidence) and evidence:match("^https?://")) then
224-
client:notify("Evidence must be a valid URL.")
224+
client:notifyLocalized("evidenceInvalidURL")
225225
return
226226
end
227227

gamemode/modules/administration/libraries/client.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,13 @@ function MODULE:PopulateAdminTabs(pages)
416416
name = L("flagsManagement"),
417417
drawFunc = function(panel)
418418
flagsPanel = panel
419-
net.Start("liaRequestAllFlags")
420-
net.SendToServer()
419+
if flagsData then
420+
OpenFlagsPanel(panel, flagsData)
421+
flagsData = nil
422+
else
423+
net.Start("liaRequestAllFlags")
424+
net.SendToServer()
425+
end
421426
end
422427
})
423428
end

gamemode/modules/administration/netcalls/client.lua

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,14 +475,13 @@ local function OpenRoster(panel, data)
475475
end
476476
end
477477

478-
lia.net.readBigTable("liaAllFlags", function(data)
479-
if not IsValid(flagsPanel) then return end
480-
flagsPanel:Clear()
481-
local search = flagsPanel:Add("DTextEntry")
478+
function OpenFlagsPanel(panel, data)
479+
panel:Clear()
480+
local search = panel:Add("DTextEntry")
482481
search:Dock(TOP)
483482
search:SetPlaceholderText(L("search"))
484483
search:SetTextColor(Color(255, 255, 255))
485-
local list = flagsPanel:Add("DListView")
484+
local list = panel:Add("DListView")
486485
list:Dock(FILL)
487486
local function addSizedColumn(text)
488487
local col = list:AddColumn(text)
@@ -555,6 +554,14 @@ lia.net.readBigTable("liaAllFlags", function(data)
555554

556555
menu:Open()
557556
end
557+
end
558+
559+
lia.net.readBigTable("liaAllFlags", function(data)
560+
flagsData = data or {}
561+
if IsValid(flagsPanel) then
562+
OpenFlagsPanel(flagsPanel, flagsData)
563+
flagsData = nil
564+
end
558565
end)
559566

560567
lia.net.readBigTable("liaFactionRosterData", function(data) if IsValid(rosterPanel) then OpenRoster(rosterPanel, data or {}) end end)

gamemode/modules/administration/submodules/permissions/libraries/client.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ function MODULE:HUDPaint()
2222
baseColor = Color(255, 0, 0)
2323
else
2424
label = subLabel
25-
baseColor = lia.config.get("espPlayersColor") or Color(255, 255, 255)
25+
baseColor = lia.option.get("espPlayersColor")
2626
end
2727
elseif ent.isItem and ent:isItem() and lia.option.get("espItems", false) then
2828
kind = L("items")
29-
label = ent.getItemTable and ent:getItemTable().name or L("unknown")
30-
baseColor = lia.config.get("espItemsColor") or Color(255, 255, 255)
29+
local item = ent.getItemTable and ent:getItemTable()
30+
label = item and item.getName and item:getName() or L("unknown")
31+
baseColor = lia.option.get("espItemsColor")
3132
elseif lia.option.get("espEntities", false) and ent:GetClass():StartWith("lia_") then
3233
kind = L("entities")
3334
label = ent.PrintName or ent:GetClass()
34-
baseColor = lia.config.get("espEntitiesColor") or Color(255, 255, 255)
35+
baseColor = lia.option.get("espEntitiesColor")
3536
end
3637

3738
if not kind then continue end
@@ -173,6 +174,7 @@ net.Receive("DisplayCharList", function()
173174
local opt1 = dMenu:AddOption(L("banCharacter"), function() LocalPlayer():ConCommand('say "/charban ' .. ln.CharID .. '"') end)
174175
opt1:SetIcon("icon16/cancel.png")
175176
end
177+
176178
if lia.command.hasAccess(LocalPlayer(), "charunban") then
177179
local opt2 = dMenu:AddOption(L("unbanCharacter"), function() LocalPlayer():ConCommand('say "/charunban ' .. ln.CharID .. '"') end)
178180
opt2:SetIcon("icon16/accept.png")

0 commit comments

Comments
 (0)