mirror of
https://github.com/rubenwardy/report.git
synced 2025-01-10 09:50:24 +01:00
Traduction des messages en français
- Ajoute message de chargement du mod dans le journal "action"
This commit is contained in:
parent
e4fb04e506
commit
b1518dbd1c
20
init.lua
20
init.lua
@ -2,13 +2,13 @@ minetest.register_chatcommand("report", {
|
|||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
param = param:trim()
|
param = param:trim()
|
||||||
if param == "" then
|
if param == "" then
|
||||||
return false, "Please add a message to your report. " ..
|
return false, "Veuillez écrire un message pour le rapport. " ..
|
||||||
"If it's about (a) particular player(s), please also include their name(s)."
|
"Si il s'agit d'un (de) joueur(s) en particulier, veuillez aussi indiquer son (leur) nom(s)."
|
||||||
end
|
end
|
||||||
local _, count = string.gsub(param, " ", "")
|
local _, count = string.gsub(param, " ", "")
|
||||||
if count == 0 then
|
if count == 0 then
|
||||||
minetest.chat_send_player(name, "If you're reporting a player, " ..
|
minetest.chat_send_player(name, "Si vous rapportez l'attitude d'un joueur, " ..
|
||||||
"you should also include a reason why. (Eg: swearing, sabotage)")
|
"vous devriez aussi dire quelle en est la raison. (Ex: insulte, sabotage)")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Send to online moderators / admins
|
-- Send to online moderators / admins
|
||||||
@ -18,19 +18,21 @@ minetest.register_chatcommand("report", {
|
|||||||
local toname = player:get_player_name()
|
local toname = player:get_player_name()
|
||||||
if minetest.check_player_privs(toname, {kick = true, ban = true}) then
|
if minetest.check_player_privs(toname, {kick = true, ban = true}) then
|
||||||
table.insert(mods, toname)
|
table.insert(mods, toname)
|
||||||
minetest.chat_send_player(toname, "-!- " .. name .. " reported: " .. param)
|
minetest.chat_send_player(toname, "-!- " .. name .. " a rapporté : " .. param)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if #mods > 0 then
|
if #mods > 0 then
|
||||||
mod_list = table.concat(mods, ", ")
|
mod_list = table.concat(mods, ", ")
|
||||||
email.send_mail(name, minetest.setting_get("name"),
|
email.send_mail(name, minetest.setting_get("name"),
|
||||||
"Report: " .. param .. " (mods online: " .. mod_list .. ")")
|
"Rapport: " .. param .. " (modos connecté(s) : " .. mod_list .. ")")
|
||||||
return true, "Reported. Moderators currently online: " .. mod_list
|
return true, "Rapporté. Moderateur(s) connecté(s) : " .. mod_list
|
||||||
else
|
else
|
||||||
email.send_mail(name, minetest.setting_get("name"),
|
email.send_mail(name, minetest.setting_get("name"),
|
||||||
"Report: " .. param .. " (no mods online)")
|
"Rapport: " .. param .. " (pas de modo connecté)")
|
||||||
return true, "Reported. We'll get back to you."
|
return true, "Rapporté. On reviendra vers vous."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.log("action", "[report] loaded.")
|
||||||
|
Loading…
Reference in New Issue
Block a user