forked from mtcontrib/report
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)
|
||||
param = param:trim()
|
||||
if param == "" then
|
||||
return false, "Please add a message to your report. " ..
|
||||
"If it's about (a) particular player(s), please also include their name(s)."
|
||||
return false, "Veuillez écrire un message pour le rapport. " ..
|
||||
"Si il s'agit d'un (de) joueur(s) en particulier, veuillez aussi indiquer son (leur) nom(s)."
|
||||
end
|
||||
local _, count = string.gsub(param, " ", "")
|
||||
if count == 0 then
|
||||
minetest.chat_send_player(name, "If you're reporting a player, " ..
|
||||
"you should also include a reason why. (Eg: swearing, sabotage)")
|
||||
minetest.chat_send_player(name, "Si vous rapportez l'attitude d'un joueur, " ..
|
||||
"vous devriez aussi dire quelle en est la raison. (Ex: insulte, sabotage)")
|
||||
end
|
||||
|
||||
-- Send to online moderators / admins
|
||||
@ -18,19 +18,21 @@ minetest.register_chatcommand("report", {
|
||||
local toname = player:get_player_name()
|
||||
if minetest.check_player_privs(toname, {kick = true, ban = true}) then
|
||||
table.insert(mods, toname)
|
||||
minetest.chat_send_player(toname, "-!- " .. name .. " reported: " .. param)
|
||||
minetest.chat_send_player(toname, "-!- " .. name .. " a rapporté : " .. param)
|
||||
end
|
||||
end
|
||||
|
||||
if #mods > 0 then
|
||||
mod_list = table.concat(mods, ", ")
|
||||
email.send_mail(name, minetest.setting_get("name"),
|
||||
"Report: " .. param .. " (mods online: " .. mod_list .. ")")
|
||||
return true, "Reported. Moderators currently online: " .. mod_list
|
||||
"Rapport: " .. param .. " (modos connecté(s) : " .. mod_list .. ")")
|
||||
return true, "Rapporté. Moderateur(s) connecté(s) : " .. mod_list
|
||||
else
|
||||
email.send_mail(name, minetest.setting_get("name"),
|
||||
"Report: " .. param .. " (no mods online)")
|
||||
return true, "Reported. We'll get back to you."
|
||||
"Rapport: " .. param .. " (pas de modo connecté)")
|
||||
return true, "Rapporté. On reviendra vers vous."
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.log("action", "[report] loaded.")
|
||||
|
Loading…
Reference in New Issue
Block a user