From ce216ad67631a8c35d31a3dc083dd818715d0d24 Mon Sep 17 00:00:00 2001 From: David Malchin Date: Sun, 21 Aug 2022 23:48:45 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Rename=20locales=20and=20remove?= =?UTF-8?q?=20`notify`=20translation=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/events.lua | 6 +++--- locale/en.lua | 14 ++++++-------- locale/ro.lua | 17 +++++++---------- server/commands.lua | 4 ++-- server/events.lua | 4 ++-- server/exports.lua | 2 +- server/player.lua | 4 ++-- 7 files changed, 23 insertions(+), 28 deletions(-) diff --git a/client/events.lua b/client/events.lua index 145197a..b183bfb 100644 --- a/client/events.lua +++ b/client/events.lua @@ -37,7 +37,7 @@ RegisterNetEvent('QBCore:Command:GoToMarker', function() local blipMarker = GetFirstBlipInfoId(8) if not DoesBlipExist(blipMarker) then - QBCore.Functions.Notify(Lang:t("notify.nowp"), "error", 5000) + QBCore.Functions.Notify(Lang:t("error.no_waypoint"), "error", 5000) return 'marker' end @@ -108,12 +108,12 @@ RegisterNetEvent('QBCore:Command:GoToMarker', function() -- If we can't find the coords, set the coords to the old ones. -- We don't unpack them before since they aren't in a loop and only called once. SetPedCoordsKeepVehicle(ped, oldCoords['x'], oldCoords['y'], oldCoords['z'] - 1.0) - QBCore.Functions.Notify(Lang:t("notify.ewtp"), "error", 5000) + QBCore.Functions.Notify(Lang:t("error.tp_error"), "error", 5000) end -- If Z coord was found, set coords in found coords. SetPedCoordsKeepVehicle(ped, x, y, groundZ) - QBCore.Functions.Notify(Lang:t("notify.tptw"), "success", 5000) + QBCore.Functions.Notify(Lang:t("success.teleported_waypoint"), "success", 5000) end) -- Vehicle Commands diff --git a/locale/en.lua b/locale/en.lua index 0191c9a..e2da6e6 100644 --- a/locale/en.lua +++ b/locale/en.lua @@ -14,16 +14,14 @@ local Translations = { not_whitelisted = 'You\'re not whitelisted for this server', server_already_open = 'The server is already open', server_already_closed = 'The server is already closed', - noperm = 'You don\'t have permissions for this..', + no_permission = 'You don\'t have permissions for this..', + no_waypoint = 'No Waypoint Set.', + tp_error = 'Error While Teleporting.', }, success = { server_opened = 'The server has been opened', server_closed = 'The server has been closed', - }, - notify = { - nowp = 'No Waypoint Set.', - ewtp = 'Error While Teleporting.', - tptw = 'Teleported To Waypoint.', + teleported_waypoint = 'Teleported To Waypoint.', }, comm ={ tp = 'TP To Player or Coords (Admin Only)', @@ -98,8 +96,8 @@ local Translations = { checking_ban = 'Hello %s. We are checking if you are banned.', join_server = 'Welcome %s to {Server Name}.', checking_whitelisted = 'Hello %s. We are checking your allowance.', - skick = 'You have been banned for cheating. Check our Discord for more information: %{discord}', - pdexp = 'You Have Been Kicked For Exploitation', + exploit_banned = 'You have been banned for cheating. Check our Discord for more information: %{discord}', + exploit_dropped = 'You Have Been Kicked For Exploitation', } } diff --git a/locale/ro.lua b/locale/ro.lua index 7186b03..1eb923f 100644 --- a/locale/ro.lua +++ b/locale/ro.lua @@ -15,15 +15,12 @@ local Translations = { duplicate_license = 'Duplicat de licenta RockStar detectata', no_valid_license = 'Nu s-a gasit nicio licenta valida RockStar', not_whitelisted = 'Nu ai statut de whitelist pe acest server', - noperm = 'Din pacate nu ai permisiunile necesare pentru asa ceva..', + no_permission = 'Din pacate nu ai permisiunile necesare pentru asa ceva..', + no_waypoint = 'Niciun punct de referinta setat.', + tp_error = 'A aparut o eroare la teleportare.', }, - success = {}, - notify = { - nowp = 'Niciun punct de referinta setat.', - ewtp = 'A aparut o eroare la teleportare.', - tptw = 'Ai fost teleportat la punctul de referinta.', - ops_open = 'Serverul este deja deschis publicului', - ops_closed = 'Serverul este inchis publicului', + success = { + teleported_waypoint = 'Ai fost teleportat la punctul de referinta.', }, comm ={ tp = 'TP catre un jucator sau catre anumite coordonate (Admin Only)', @@ -98,8 +95,8 @@ local Translations = { checking_ban = 'Salutari %s. Verificam daca ai primit ban la noi :)', join_server = 'Bun venit %s pe {Server Name}.', checking_whitelisted = 'Salutari %s. Iti facem o verificare scurta.', - skick = 'Ai fost banat pentru cheating. Informatii suplimentare pe serverul nostru de Discord: ', - pdexp = 'Ai primit KICK pentru ca ai incercat un exploit!', + exploit_banned = 'Ai fost banat pentru cheating. Informatii suplimentare pe serverul nostru de Discord: ', + exploit_dropped = 'Ai primit KICK pentru ca ai incercat un exploit!', } } diff --git a/server/commands.lua b/server/commands.lua index 4afc004..44240a5 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -157,7 +157,7 @@ QBCore.Commands.Add('openserver', Lang:t("comm.opserv"), {}, false, function(sou QBCore.Config.Server.Closed = false TriggerClientEvent('QBCore:Notify', source, Lang:t('success.server_opened'), 'success') else - QBCore.Functions.Kick(source, Lang:t("error.noperm"), nil, nil) + QBCore.Functions.Kick(source, Lang:t("error.no_permission"), nil, nil) end end, 'admin') @@ -177,7 +177,7 @@ QBCore.Commands.Add('closeserver', Lang:t("comm.cserv"), {{ name = Lang:t("comm. end TriggerClientEvent('QBCore:Notify', source, Lang:t('success.server_closed'), 'success') else - QBCore.Functions.Kick(source, Lang:t("error.noperm"), nil, nil) + QBCore.Functions.Kick(source, Lang:t("error.no_permission"), nil, nil) end end, 'admin') diff --git a/server/events.lua b/server/events.lua index 8493b65..9fedad9 100644 --- a/server/events.lua +++ b/server/events.lua @@ -87,7 +87,7 @@ RegisterNetEvent('QBCore:Server:CloseServer', function(reason) end end else - QBCore.Functions.Kick(src, Lang:t("error.noperm"), nil, nil) + QBCore.Functions.Kick(src, Lang:t("error.no_permission"), nil, nil) end end) @@ -96,7 +96,7 @@ RegisterNetEvent('QBCore:Server:OpenServer', function() if QBCore.Functions.HasPermission(src, 'admin') then QBCore.Config.Server.Closed = false else - QBCore.Functions.Kick(src, Lang:t("error.noperm"), nil, nil) + QBCore.Functions.Kick(src, Lang:t("error.no_permission"), nil, nil) end end) diff --git a/server/exports.lua b/server/exports.lua index f94f6a3..f080732 100644 --- a/server/exports.lua +++ b/server/exports.lua @@ -328,7 +328,7 @@ local function ExploitBan(playerId, origin) 2147483647, 'Anti Cheat' }) - DropPlayer(playerId, Lang:t('info.skick', {discord = QBCore.Config.Server.Discord})) + DropPlayer(playerId, Lang:t('info.exploit_banned', {discord = QBCore.Config.Server.Discord})) TriggerEvent("qb-log:server:CreateLog", "anticheat", "Anti-Cheat", "red", name .. " has been banned for exploiting " .. origin, true) end diff --git a/server/player.lua b/server/player.lua index f2e854b..f0defa5 100644 --- a/server/player.lua +++ b/server/player.lua @@ -23,7 +23,7 @@ function QBCore.Player.Login(source, citizenid, newData) end QBCore.Player.CheckPlayerData(source, PlayerData) else - DropPlayer(source, Lang:t("info.pdexp")) + DropPlayer(source, Lang:t("info.exploit_dropped")) TriggerEvent('qb-log:server:CreateLog', 'anticheat', 'Anti-Cheat', 'white', GetPlayerName(source) .. ' Has Been Dropped For Character Joining Exploit', false) end else @@ -553,7 +553,7 @@ function QBCore.Player.DeleteCharacter(source, citizenid) end end) else - DropPlayer(source, Lang:t("info.pdexp")) + DropPlayer(source, Lang:t("info.exploit_dropped")) TriggerEvent('qb-log:server:CreateLog', 'anticheat', 'Anti-Cheat', 'white', GetPlayerName(source) .. ' Has Been Dropped For Character Deletion Exploit', true) end end